I want to have users input a date and use their previously chosen month to make sure they enter a valid date that's within that month, but the else clause for my first month bleeds out to february (I'm assuming because the wrong answers are inclusive within Jan's range). Is there a way to fix this? Or would I have to make a list for each month's day?
month = ["january", "february", "march", "april", "may", "june", "july","august", "september", "october", "november", "december"]
mes = (input("input a month in full: "))
while mes not in month:
print()
mes = (input("mm please input a month in full: "))
print()
else:
print()
print("*.+ " + mes + " +.*")
print()
mesD=int(input("input a date:"))
while mesD:
while mes<="january":
if 0 < mesD <= 31:
print()
print("*.+ " + mes +' '+ str(mesD) + " +.*")
print()
break
else:
print()
print("there are only 31 days in january silly!")
print()
mesD=int(input("input a date:"))
while mes<="february":
if 0 < mesD <= 28:
print()
print("*.+ " + mes +' '+ str(mesD) + " +.*")
print()
break
else:
print()
print("there are only 28 days in february silly!")
print()
mesD=int(input("input a date:"))