the return from this code (date) is 'none' if an invalid entry is provided, then a valid entry is given. However if a valid entry is given first time, the correct return for date is given. Any tips on how I can solve it?
def getDate():
date = input("Please enter the date in DD/MM/YYYY format: ")
try:
strptime(date, "%d/%m/%Y")
return date
except:
print ("Invalid Date, please enter again")
getDate()