find_item = input("Enter the item to be searched here:- ").lower() items = {'wand': 5, 'telescope': 2, 'feather pen': 7} for thing in items: if thing == find_item: print(f"{items[thing]} units of {thing} are present.") break else: print('No stock left! You need to go and buy!!')