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:]
if m < 10:
nm = int(m[1:])
month_name = MONTHS[nm - 1]
else:
month_name = MONTHS[m - 1]
result= ??????
return result
s = '2000/06/24'
r = date_convert(s)
print(r)
I am working on final exam view(python 3.0 +), and I have been doing practices all day. I suddenly don't know how to put month_name a , y together as a string use 'result' ( result = ???). and then return it to main program. Here is the result I need : convert 2000/06/24 to June 24, 2000. My brain is not working now, please someone helps me. Thank you so much. I cannot use any bulit-in functions. pleases just help me put anything together as a string. Thanks again.