Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
int to bin and maketrans in two lines solution in Clear category for Morse Clock by Olpag
def checkio(time_string: str) -> str:
h, m, s = ((int(n)//10, int(n)%10) for n in time_string.split(':'))
return '{:02b} {:04b} : {:03b} {:04b} : {:03b} {:04b}'.format(*h,*m,*s).translate(str.maketrans('01', '.-'))
March 13, 2019
Comments: