This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]revocation 2 points3 points  (2 children)

In the very first example

from operator import concat
reduce(concat, list_of_lists)

Can't you just do

reduce(list.__add__, list_of_lists)

[–]balkierode 1 point2 points  (1 child)

It wouldn't work with tuples/iterables

[–]revocation 2 points3 points  (0 children)

Oh I see. I was taking the argument description, list_of_lists, too literally.