+ 2
How to pass all the test case...!
Create a function that takes in a string containing a date that is in US format, and return a string of the same date converted to EU. Input Format: A string that contains a date formatting 11/19/2019 or November 19, 2019. Output Format: A string of the same date but in a different format: 19/11/2019. user= input() data= user.split("/") data[0],data[1]=data[1],data[0] u="/" print(u.join(data))
3 ответов
+ 3
I think your code is great, but it also needs to work for month names like January, February etc. according to the prompt. Try making a list of month names and converting them to numbers at the beginning of your code. I hope this helps.
+ 3
madeline okay i will try this sol too
+ 1
Good to hear Mihir, you could also use a dictionary to store the month names and numbers. There are many ways to solve the problems. Good luck!