On Sun, Oct 16, 2016 at 03:02:55PM +0200, Ivan Levkivskyi wrote:

> What I have learned from this megathread is that the syntax [*foo for foo
> in bar]
> is proposed as a replacement for a one-liner itertools.chain(*[foo for foo
> in bar]).

If people take away nothing else from this thread, it should be that 
flattening an iterable is as easy as:

[x for t in iterable for x in t]

which corresponds neatly to:

for t in iterable:
    for x in t:

Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to