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 herehrs="12"splitted=s.split(":")print(splitted)if"PM"insplitted[2][2:]:if"12"notinsplitted[0]:hrs=str(int(hrs)+int(splitted[0]))if"AM"insplitted[2][2:]:if"12"notinsplitted[0]:hrs=splitted[0]else:hrs="00"returnhrs+":"+splitted[1]+":"+splitted[2][:2]
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 without using time module