1 2 3 4 5 6 7 8 9 10 11
FRUITS = {"apple": 1, "orange": 10} def pick_fruit(name): try: count = FRUITS[name] except KeyError: return count += 1 print(f"Got fruit count {count}")