Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Morse Clock by lechrudik
def checkio(time_string: str):
n = [2, 4, 0, 3, 4, 0, 3, 4]
s = ":".join([i.zfill(2) for i in time_string.split(':')])
m = [bin(int(i))[2:].rjust(n[c], '0').replace('0', '.').replace('1', '-') if i.isdigit() else i for c, i in enumerate(s)]
return ' '.join(m)
April 9, 2022
Comments: