Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Morse Clock by u8m_
def checkio(time_string):
h,m,s = [x.rjust(2,"0") for x in time_string.split(":")]
f = lambda n,d: bin(int(n))[2:].replace("1","-").replace("0",".").rjust(d,".")
return "%s %s : %s %s : %s %s" % (f(h[0],2), f(h[1],4), f(m[0],3), f(m[1],4), f(s[0],3), f(s[1],4))
Nov. 22, 2015
Comments: