On Thu, Jun 17, 2021, 1:38 AM Chris Angelico > >>> list(chain.from_iterable(list_of_lists)) > > > More-itertools has flatten(): > https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.flatten. > That seems better than a method specific to lists. > > ... which is built on top of chain.from_iterable. :) >
Oh, of course. And anyone can put it in their personal utility library too. I just meant it in the sense that the name might be more intuitive to beginners. >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/2T53ADB3TVQJF2UENEXKB5G5ZWTQOQVW/ Code of Conduct: http://python.org/psf/codeofconduct/
