News for hackers. Stuff that matters.
Re:Functools – The Power of Higher-Order Functions in Python by nerdponx on Friday July 09, 2021 @02:06AM (#27780869)
I have written this in serious code before, and I don't regret it:

    from itertools import chain

    flatten = chain.from_iterable
    def lflatten(x): return list(flatten(x))
    def sflatten(x): return set(flatten(x))

There are no comments on this comment yet.