I am trying to do triple nesting of while loops. If you input a decimal number it returns error, then if you input number above 31 it returns error, but if you try again to input decimal number code stops. Need help making it indefinite loop no matter how many times, or what order, a user inputs incorrect format. Also need to verify that dates input are valid for number of days in given month?
import string
varD= input("Enter Date/Day:")
while varD.isdigit() or varD.isspace()\
or varD.isdecimal or int(varD)>31 \
or int(varD)==26 or int(varD)<=0:
print ("Error: Enter Valid Number!")
varD= input("Enter Day:")
else:
print ("You have entered:", varD)