Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shopping = []#create a list called shopping
- for item_number in range(5):#create a loop that repeats 5 times
- item = input("what is item number " + str(item_number) + "? ")#ask the user to enter an item onto the list convert item_numbervariable into a string
- shopping.append(item)#add users item to the list
- print(shopping)#print out the shopping list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement