Anyone got a shorter solution for this question? I've just learnt Python3 for 6 days. Appreciate your help.


30th Dec 2019, 5:53 PM
Noob - avatar
3 Answers
+ 2
Mine was 8 lines. I'm sure the Python experts code is smaller. I split the input on spaces. If ended up with three elements, removed the comma from the day and replaced the month with the list index of the matching month name. If single element, split on slash into three. In both cases, print the numbers in new format.
31st Dec 2019, 1:33 AM
John Wells
John Wells - avatar
+ 2
Why do you want a shorter solution? Did you pass all tests with your methods? (Mine is different, but not much shorter.)
30th Dec 2019, 6:59 PM
HonFu - avatar
31st Dec 2019, 2:31 AM