OK, so I am trying to make a shopping list which appends each item entered to an array until the user enters "0"
I have got this far and it just doesnt work :-(
Would really appreciate some suggestions or pointers!
Thanks very much!
I have got this far and it just doesnt work :-(
Would really appreciate some suggestions or pointers!
Thanks very much!
Code:
ShopList = []
ListItem= ()
print("To make a shopping list")
print("Enter the items, when you have finished press 0 to display the list.")
while ListItem != 0:
ListItem = input ("Enter your Item to the List: ")
ShopList.append(ListItem)
print ("Here's your Shopping List:")
for item in ShopList:
print item
Comment