0
MilitaryTime code[SOLVED]
a=input("") c=a.split() if c[1]=="AM": print(c[0]) elif c[1]=="PM": print(str(int(c[0].split(":")[0])+12)+":"+c[0].split(":")[1]) Why doesnt it work
3 Answers
+ 2
when i put in
2:47 AM
#the output is
2:47
it should be 02:47 (XX:XX format)
+ 1
Thanks guys its done
0
Hi! You are soon getting there, but you need to add some lines. It is easy to miss, but you have to fix so 12:34 AM => 00:34. Regards /Per B