0

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

https://code.sololearn.com/cL7538z87BYO/?ref=app

30th Dec 2019, 5:53 PM
Noob
Noob - avatar
3 Réponses
+ 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
HonFu - avatar
31st Dec 2019, 2:31 AM
Rora