0
What's the fault in my code 🙁🙁
Just a one case doesn't work 🙁 h=input() months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] L=h.split(' ') if L[0] not in months: N=h[3:6]+h[:3]+h[6:] print (N) else: K=months.index(L[0])+1 Y=L[1] N=Y[:-1]+'/'+str(K)+'/'+L[2] print (N)
6 Answers
+ 3
What do you want to do with this?
+ 3
Here you should get whole Y.
So not Y[:-1] but Y[0:]
N=Y[0:]+'/'+str(K)+'/'+L[2]
+ 1
Convert US date to EU date
+ 1
إسلام دخيلي
Try this if you input
September 22 2020
It prints 22/9/2020
0
No it's y[:-1] cz we have in L a num+,