0
Military time
https://code.sololearn.com/c4rh4tx6q7Ey/?ref=app s=input().split(" ") if s[1]=="PM": l=s[0].split(":") n=int(l[0])+12 print((str(n)+":"+l[1])) else: print(s[0])
1 Answer
+ 2
i = input()
if i.replace(' PM','') == i:
print(i.replace(' AM',''))
else:
j = i.replace(' PM','').split(':')
j[0] = str(int(j[0]) + 12)
i = j[0]+':'+j[1]
print(i)
#Sai Teja here you go
I'd it like this