Nov-25-2020, 09:21 AM
you need to indent lines 1 and 19
you should avoid using globals, instead, return choice.
example:
you should avoid using globals, instead, return choice.
example:
def food(): x = 1 while x > 0 and x <= 15: try: more() x = int(input("Enter your choice: ")) choice.append(x) except: invalid() else: choice.remove(20) if len(choice) == 0: emptylist() else: choice.sort() print ("This is your selection:",choice) close() return choice print(food())