Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shopping = []
- how_many = input("How many items of shopping do you need? ")
- how_many = int(how_many)
- for item_number in range(how_many):
- item = input("What is item number " + str(item_number +1) + "? ")
- # item_number starts at 0, most people start counting at 1;
- # even computer programmers, most of the time
- shopping.append(item)
- for item in range(len(shopping)):
- print(shopping[item])
- print("You have ",len(shopping)," items on your list")
Advertisement
Add Comment
Please, Sign In to add comment