I am having a problem, I have function that takes input and returns True if the input is "yes", False if it is "no", and calls its self if the input is something else. Here is my code:
def call_from_Zeus():
system("cls||clear")
call_from_Zeus_string = """ ___ _ _ ___ ___ __ __ ___ _ _ ___ ___ _ _ _
|_ _| \| |/ __/ _ \| \/ |_ _| \| |/ __| / __| /_\ | | | |
| || .` | (_| (_) | |\/| || || .` | (_ | | (__ / _ \| |__| |__
|___|_|\_|\___\___/|_| |_|___|_|\_|\___| \___/_/ \_\____|____|
\33[1;37;49mFROM: \33[1;34;49mMr.Zeus[ADMIN\33[1;33;49m+\33[1;34;49m]\33[0m
\33[1;37;49mTO: USER#8009395797394869
\33[0m
"""
print(call_from_Zeus_string)
in1 = input('\t Accept Call(Enter "yes" or "no")? ')
if in1 == "yes" or in1 == "Yes" or in1 == "YES" or in1 == "y":
return True
elif in1 == "no" or in1 == "No" or in1 == "NO" or in1 == "n":
return False
else:
del in1
call_from_Zeus()
The code its self does not crash, but if the input is invalid it calls its self no matter what you enter it resorts to the else:
statement.
I have no idea what is going on. As you can see I even tried del
ing the in1
variable. Thanks for any help in advance!
-Zeus