Last active
May 8, 2021 10:39
-
-
Save computer-tutor/ed159d80ef51f483e503911d7b2d73fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MONTHS = ['January', 'February', 'Match', 'April', 'May', 'June', | |
'July', 'August', 'September', 'October', 'November', 'December'] | |
def date_convert(s): | |
y = s[:4] | |
m = int(s[5:-3]) | |
d = s[8:] | |
month_name = MONTHS[m-1] | |
result= month_name + ' ' + d +' '+ y | |
return result | |
s = '2019/09/06' | |
r = date_convert(s) | |
print(r) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment