How do i add a set of values in order (per inventory) from a user's input for e.g. {fruit:{1,2,3,4},{veggies:{5,6,7,8}}
Nothing i've tried so far ever worked.
Here's my code:
def Create_Inventory():
clear()
inventory_dictionary = {}
count_inventory = int(input("Enter the number of Inventories: "))
for num_inv in range(count_inventory):
add_inventory = str(input("Enter Inventory #%d: " % (num_inv + 1)))
inventory_dictionary[add_inventory] = set()
for find_key in inventory_dictionary:
count_item = int(input("\nHow many items in %s inventory: " % find_key))
for num_item in range(count_item):
#add_item = input("Enter item #%d: " % (num_item + 1))
#inventory_dictionary[find_key].add(add_item)
add_item = set(input("Enter item #%d: " % (num_item + 1)))
inventory_dictionary[find_key].update(add_item)
My full code: https://pastebin.com/gu5DJX5K