I want to do this:
(apply nconc ref)
but in #Python 3.8.
So I wrote this:
[i for j in ref for i in j].
Is this idiomatic? Is there any suggestion?
@veer66 can't say how widely it's used, but it is indeed how I usually flatten "sequence of sequences". There's also moreitertools.flatten if you don't mind a dependency. https://github.com/erikrose/more-itertools
@isagalaev @veer66 how is flatten different from iterttols.chain.from_iterable?
@pixel @veer66 https://github.com/erikrose/more-itertools/blob/master/more_itertools/recipes.py#L223
@isagalaev @veer66 nice!
A beta setup of a Mastodon instance primary for family and friends.