New course! Every coder should learn Generative AI!
Try a free lesson+ 1
What is wrong with this code
1 Answer
+ 3
grocery_list={1:"", 2:"",3:"", 4:"",}
grocery_list[1]=input("1:")
grocery_list[2]=input("2:")
grocery_list[3]=input("3:")
grocery_list[4]=input("4:")
print(grocery_list)
This Is the right way and then when you will enter 4 input then it will replace the value of empty string