In my program, I'm trying to run a "def command" in a conditional statement. An error pops up saying name 'command' is not defined.
I tried to rewrite the code and tried to reload the repl.it server many times.
def main():
inputmain = input("...")
if inputmain == "Yes" or "yes" or "y" or "Y":
command()
elif inputmain == "No" or "no" or "n" or "N":
print("Ok.")
else:
print("Error")
main()
def command():
...
...
command()
I expect the output of "y" to be the program command() but it's the error above.