First solution in Clear category for Time Converter (24h to 12h) by thealfest1
h = int(time[:2])
postfix = ' p.m.' if h > 11 else ' a.m.'
return str(h - (12 if h > 12 else 0 if h else -12)) + time[2:] + postfix
Jan. 15, 2019