I am trying to make a dictionary by getting the item name and the number of items from the user and make them a key,value pair. This is the code I have so far:
groceries={}
item,number=input("Enter item and number").split()
I am trying to make my code as short as possible and do not want to use the for loop. Is there a way to do this by adding one more line to my code? Meaning when I use print(groceries) I want to actually see the dictionary items that I entered.
Thank you.