I have imported sys and created a "play again" function that is called correctly and outputs to the screen. However, the function executes os.execl(sys.executable, sys.executable, *sys.argv)
no matter what input it is given.
def playAgain():
print("would you like to play again? Y/N :")
playAgainx = input()
if playAgainx == "Y" or "y" or "yes" or "Yes" or "YES":
os.execl(sys.executable, sys.executable, *sys.argv)
elif playAgainx == "n" or "N":
sys.exit()
else:
print("invalid input")
playAgain()