8 ms·
"... Yes, the list comprehension beats it all. It’s simple and elegant. Most importantly beautiful and pleasing to look at. ..." ''.join(chr(48+((ord(c)>>b)&
by bootload 18y ago
"... Yes, the list comprehension beats it all. It’s simple and elegant. Most importantly beautiful and pleasing to look at. ..."
''.join(chr(48+((ord(c)>>b)&1)) for b in xrange(7,-1,- 1))
One line I like I was using today. Of course there is always the chance the person using the big stupid language can also use other smaller succinct ones.