Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat Mar 29 04:08:15 CET 2014

On Sat, 29 Mar 2014 13:45:12 +1100, Chris Angelico wrote:

> Considering that we have ten fingers, having 1114112 keys would be quite
> impractical. The smallest number of keys to render that many characters
> would probably be 21, but it'd be toggling data into a computer, rather
> than typing; *every* character would require holding down a good number
> of keys. (Or you could go the other way and have exactly two keys: 1 and
> 0. Press either 21 times to enter a single character.)


Steven D'Aprano

More information about the Python-list mailing list