This is the same task as the previous one, with a different restriction.
fruit_prices is a non-empty dictionary with fruit names as keys and prices as
values. Write find_cheapest_fruit_no_loops(fruit_prices) that returns the name
of the fruit with the lowest price; on a tie, the fruit that comes first in the
dictionary wins.
Do not write an explicit loop -- use the min function with a key
argument.
Example
find_cheapest_fruit_no_loops({'Apple': 2, 'Banana': 3, 'Kiwi': 1}) returns 'Kiwi'.
Implement this function:
def find_cheapest_fruit_no_loops(fruit_prices: dict) -> str:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: fruit_prices.
Input
{'Apple': 2, 'Banana': 3, 'Kiwi': 1}
Output
'Kiwi'