while True:
print("Menu:")
print("1. Add Task")
print("2. Display Tasks")
print("3. Update Task Status")
print("4. Exit")
choice = input("Enter your choice: ")
if choice == "1":
print("Please enter 'exit' if you want to back to main menu")
title = input("Enter task title: ")
if title != " Back" or " back" or " exit":
description = input("Enter task description: ")
due_date = input("Enter task due date: ")
status = input("Enter task status: ")
elif title == " exit":
continue
in this code, I am trying to tell it if it says the following: we will return to the main menu. If he says anything else, the loop will continue. Yet it is doing the reverse for me. If I say the keyword it continues the loop. If I say something different, it says the word is not correct and ends the code.
I tried adding continue as it's supposed to continue to the next iteration of the loop. I thought it would go back. I'm just confused.