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):x=s.rsplit(":")if(x[2].endswith("PM")andint(x[0])!=12):x[0]=str(int(x[0])+12)elif((x[2].endswith("AM")andint(x[0])==12)):x[0]="00"# Write your code herereturnx[0]+":"+x[1]+":"+x[2].strip("APM")
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 →