You are viewing a single comment's thread from:
RE: Payment for Coding done
Function to find the best deal based on price
def find_best_deal(flight_data):
best_deal = min(flight_data, key=lambda x: x["price"])
return best_deal
def find_best_deal(flight_data):
best_deal = min(flight_data, key=lambda x: x["price"])
return best_deal