Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
masochism? solution in Creative category for Time Converter (24h to 12h) by kdim
from datetime import datetime
def time_converter(time):
d = {
'ptime': lambda x: datetime.strptime(x, '%H:%M'),
'ftime': lambda x: x.strftime('%-I:%M %p'),
'lower': lambda x: x.lower(),
'ddott': lambda x: x.replace('m', '.m.')
}
for i in d:
time = d[i](time)
return time
Jan. 27, 2021
Comments: