Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
5-liner: easy no import solution in Clear category for Time Converter (12h to 24h) by przemyslaw.daniel
def time_converter(str_time):
time, am_pm = str_time.split()
hour, minute = map(int, time.split(':'))
hour = hour % 12 + 12*(am_pm == 'p.m.')
return f'{hour:02}:{minute:02}'
Sept. 11, 2018
Comments: