+ 1
Convert date challenge What is wrong?
This is my try ,can not understand error type .https://code.sololearn.com/c47LsqN7n1Z6/?ref=app
4 Antworten
+ 1
There are two cases in input ..did u consider those
+ 1
from datetime import datetime
s=input()
try:
print(datetime.strptime(s, "%m/%d/%Y").strftime("%-d/%-m/%Y"))
except:
print(datetime.strptime(s, "%B %d, %Y").strftime("%-d/%-m/%Y"))
+ 1
[Solved]Thanks , it was a bad formatted code error .but still not working in test cases .