So I was creating a Python project, let's just keep the details secret. The user can choose between two features to run and this choice is collected in a variable using 'input' function. Everything goes right and there are no errors in the whole file but, the if-elif-else statement that I'm using doesn't seem to work properly.
initiate = input("Your input here: ")
if 'a' or 'file' in initiate:
FileCheck()
elif 'b' or 'word' in initiate:
WordCheck()
else:
print("You have entered an invalid input. Exiting...")
sleep(5)
exit
If I give 'a' or 'b' as input, it still runs the 'FileCheck' function. Both functions are properly defined. If invalid input is given, it does run the 'else' part, but not the 'WordCheck' function when the user inputs 'b' or 'word'. The code doesn't throw any errors too. Please help me through this. Thanks!