Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7
If you don't need argument validation, it's a one-liner function: def dateConv(date): return "/".join(a[2:].split('-')[::-1]) a = "2016-1-25" print(dateConv(a)) >>> 25/1/16 https://code.sololearn.com/cqny043e5OjS/?ref=app Also, check out my Date Converter I to get the idea: https://code.sololearn.com/crgVNxIU9Cdy/?ref=app
30th Mar 2017, 5:56 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar