We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
deftimeConversion(s):# Write your code heream=s[-2:]time_f=s[:-2].split(':')ifam=='AM':iftime_f[0]=='12':time_f[0]='00'else:iftime_f[0]!='12':time_f[0]=str(12+int(time_f[0]))return':'.join(time_f)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Time Conversion
You are viewing a single comment's thread. Return to all comments →
Python