Advertisement
braconnier

Untitled

Nov 28th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. shopping_list = []
  2. how_many = input( "How many items of shopping are needed ? ")
  3. how_many = int(how_many)
  4. for items in range (how_many):
  5. items = input(" what is the item " + str(how_many) + " ?")
  6. shopping_list.append(items)
  7. print (shopping_list)
  8. print ("an other type of list: ")
  9.  
  10. for item in shopping_list:
  11. print (item)
  12.  
  13. print (" I have " + str(len(shopping_list)) + " items in my shopping list")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement