Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shopping = []
- count = 0
- how_many = input("How many shopping items do you require?")
- how_many = int(how_many)
- for item_number in range(how_many):
- item_number = item_number + 1
- item = input("What is item number " + str(item_number) + "?")
- shopping.append(item)
- if item == " " or item == "":
- shopping.remove(item)
- print("Your current list is as follows:")
- for item in shopping:
- print(item)
- count = count + 1
- print("You have a total of " + str(count) + " items in your shopping list")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement