I am trying to write a simple code that requires the user to input his name but if the input is blank, it takes him back to the first input again until he enters a letter or number:
print "Hello! Welcome to the Trivia " begin = raw_input ("Would you like to begin?: ") while True: begin == "" print "You have to write something..." break if begin.lower() == "yes" or begin.lower() =="y": print "Good choice, You got to risk it to earn the biscuit"
How do I do this so the loop works as kind of an “if” as well. If the user inputs a blank it would take him back to the beginning but if not, it will allow him to continue.