You are viewing a single comment's thread from:

RE: Payment for Coding done

Function to find the most expensive flight and its details

def find_most_expensive_flight(flight_data):
most_expensive_flight = max(flight_data, key=lambda x: x["price"])
return most_expensive_flight