0
Need help on Military Time
Why my code doesn't work? time = input().replace('12', '0') lst = time[:5].split(':') if time[-2:] == 'AM': print(time[:5]) else: print(str(int(lst[0])+12)+':'+lst[1])
1 Odpowiedź
+ 4
some common mistakes like
"1" but it should be "01" and time for 12AM
(00:00)
https://www.sololearn.com/discuss/2105377/?ref=app
https://www.sololearn.com/discuss/2477094/?ref=app
https://www.sololearn.com/discuss/2135204/?ref=app
https://www.sololearn.com/discuss/2119386/?ref=app
hope you got it