fruit_prices is a non-empty dictionary with fruit names as keys and prices as
values.
Write find_cheapest_fruit(fruit_prices) that returns the name of the fruit with
the lowest price. If several fruits share the lowest price, return the one that
comes first in the dictionary.
Use an explicit loop -- do not use the min function.
Example
find_cheapest_fruit({'Apple': 2, 'Banana': 3, 'Kiwi': 1}) returns 'Kiwi'.
Implement this function:
def find_cheapest_fruit(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'