On Thu, Jun 17, 2021 at 4:07 PM Guido van Rossum <gu...@python.org> wrote: > > Just trolling along, flattening a list could be written as > > functools.reduce(list.__iadd__, xs, []) > > Right? >
Insufficiently trolly - lacks walrus operator. :) >>> l = [[1,2],[3,4],[5,6],[7,8],[9]] >>> any(map((x:=[]).extend, l)) or x [1, 2, 3, 4, 5, 6, 7, 8, 9] ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/RG4BRSGZPWO2WMUHVRXWIIPTSIB6GGTR/ Code of Conduct: http://python.org/psf/codeofconduct/