Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pprint import pprint
- products = {}
- cod = 0
- def productsList():
- while cod != "9999":
- cod = input("Enter cod: ")
- if len.cod != 4:
- print("opps! the product isn't found, try agine")
- productsList()
- productName = input("Enter name: ")
- price = int(input("Enter price: "))
- products[cod] = [productName, price]
- print(products[cod])
- while True:
- print("\n1. Create a new products list\n \
- 2. See lists\n \
- 3. Quit\n")
- userChoise = int(input())
- if userChoise == 1:
- productsList()
- elif userChoise == 2:
- print(AsStudents.keys)
- elif userChoise == 3:
- quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement