Comment

Comment by rockymeza

You can also do

    itertools.chain.from_iterable(itertools.combinations(a, n) for n in range(len(a) + 1))
parent rockymeza 12 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton