So I am an beginner to Python and I self-taught some basic stuff. So i'm trying to create an Quiz game and on the menu you need to put in the number to corresponds to one of the options. So if you wanted to play an quiz, you'd type 1. But one thing is that I made it so if let's say instead of typing 1 or 2 you type in "i amz rebels lol" it would simply just do the input again till it get's 1 or 2. While this works, I would like it to be more cleaner. So is there an way that if I said "lol" it would delete the text of it saying lol and basically replace it with the input? So instead of input making a new line it would delete the "lol" and then do the input. If there isn't is there any workarounds to this? If it's needed here's the code i have so far.
print("========================")
print("= Quiz! =")
print("========================")
print(" 1 = Play Quiz.")
print(" 2 = Quiz Maker")
while True:
menu = input()
if menu == "1":
print("1")
elif menu == "2":
print("2")
else:
continue