0
while shopping:
    user_input = input(
        f'What area do you want to explore?: \n a) Food \n b) Fruit \n c) Dairy \n:').upper
    if user_input == 'A' or 'FOOD':
        print(food_list)
        break

    elif user_input == 'B' or 'FRUIT':
        print(fruit_list)
        break

    elif user_input == 'C' or 'DAIRY':
        print(dairy_list)
        break
Mat
  • 202,337
  • 40
  • 393
  • 406

1 Answers1

0
if user_input == 'A' or 'FOOD'

Is always True so , Change all if statements like this :

if user_input == 'A' or user_input = 'FOOD'
AmirHmZ
  • 516
  • 3
  • 22
  • In [How to Answer](https://stackoverflow.com/help/how-to-answer), see the section *Answer Well-Asked Questions*, and therein the bullet point regarding questions that "have been asked and answered many times before" – Charles Duffy Apr 11 '20 at 16:52
  • In particular, this is so much a FAQ we have a language-agnostic duplicate target for it, since there were so many duplicates in each of the Python, JavaScript, and other per-language tags. – Charles Duffy Apr 11 '20 at 16:52
  • Thank you, so much you solved my problem.☺️ – Deep Parmar Apr 11 '20 at 17:01