You are viewing a single comment's thread. Return to all comments →
def time_conversion(s): hours = int(s[:2].replace('12', '00')) if s[-2:] == 'PM': return str(hours + 12) + s[2:-2] return f'{hours:02d}' + s[2:-2]
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 →