Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def time_converter(time):
- h, m = map(int, time.split(':'))
- return f"{(h-1)%12+1}:{m:02d} {'ap'[h>11]}.m."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement