python coding contest
Szabolcs Nagy
nszabolcs at gmail.com
Fri Dec 30 12:24:45 EST 2005
my two solutions (well I wasn't so clever to encode everything in
strings instead of numbers, but at least it won't give warnings about
non ascii characters):
128:
j,seven_seg=''.join,lambda s:j(j(' |_ |'[i>>3*int(c)&b]for c in s for b
in(4,2,1))+'\n'for i in(306775170,1060861645,524130191))
122:
seven_seg=lambda s,j=''.join:j(j(' _ _|_| |_
|'[i>>3*int(c)&14:][:3]for c in s)+'\n'for i
in(8208,934111592,664455910))
More information about the Python-list
mailing list