0
what's wrong in my code it says 2test cases fail
https://www.sololearn.com/coach/70?ref=app time=input() p="" for i in time: if i==":": break else: p+=i if "AM"in time: print(p+time[-6:-3]) else: print(str(int(p)+12)+time[-6:-3])
1 Answer
0
You forgot to pad 0 when time is AM.
For example input = 1:15 AM
The output should be 01:15 rather than 1:15.