Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Quick solution (map and f-string) solution in Speedy category for Time Converter (24h to 12h) by bsquare
def time_converter(time):
hour, minute = map(int, time.split(':'))
return f"{(hour-1)%12+1}:{minute:02d} {'ap'[hour>11]}.m."
Sept. 18, 2019
Comments: