You are viewing a single comment's thread. Return to all comments →
Python 3 sol:
def timeConversion(s): if s.endswith('PM') and s[:2] != '12': s = str(int(s[:2]) + 12) + s[2:] elif s.endswith('AM') and s[:2] == '12': s = '00' + s[2:] return s.strip('PMA')
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 3 sol: