Advertisement
zhongnaomi

make a shopping list with python 3

Jan 7th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. shopping = []
  2. R1 = input ( "How many items of shopping do you have? ")
  3.  
  4. for item_number in range(int(R1)):
  5.     item = input ( "What is the No." + str(item_number+1) + " item to buy today? " )
  6.     shopping.append(item)
  7.    
  8. print(shopping)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement