Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Morse Clock by ndj_ys
def checkio(time: str) -> str:
h,m,s = [[format(int(j)//10,"b").zfill(3),format(int(j)%10,"b").zfill(4)]
for j in time.split(":")]
num = (" : ").join([(" ").join(h)[1:],(" ").join(m),(" ").join(s)])
return num.translate(str.maketrans("01",".-"))
Sept. 1, 2018