Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- while True:
- decision_for_description = input("Do you want to add any description?\n").lower()
- if decision_for_description == "yes" or decision_for_description == "y":
- while True:
- description = input("Please provide valid description of your product.\n")
- if len(description) > 255:
- print("Hey, maximum description length is 255 characters!")
- else:
- raise StopIteration
- elif decision_for_description == "no" or decision_for_description == "n":
- description = ""
- break
- else:
- print("Please choose yes or no.")
- except StopIteration:
- pass
- global product
- product = (name, quantity, type, category, description)
- return display_ready_product()
Advertisement
Add Comment
Please, Sign In to add comment