def main(): notCorrect = True while (notCorrect): day, mon, year = eval (input ("Enter day, month, year: ")) notCorrect = False if ((year < 1900) or (year > 2100)): notCorrect = True continue if ((mon < 1) or (mon > 12)): notCorrect = True continue # check the day print (day, mon, year) main()