asking the user for input until they give a valid response in python

asking the user for input until they give a valid response in python


while True:
    try:
        n = input()
        print(n)
    except:
        break

Comments