2 ms·
> most of my one-offs are unashamedly terrible. I never intended this to see the light of day, but since the topic warrants it, here is a python one-liner I'm
by chestervonwinch 11y ago
> most of my one-offs are unashamedly terrible.
I never intended this to see the light of day, but since the topic warrants it, here is a python one-liner I'm using to put the indices of combinations of subsets into one list:
combos = map(list,reduce(lambda x,y: x+y,[[c for c in itertools.combinations(range(8),i)] for i in range(1,9)]))
yuck. These things usually end up as a result of testing and tweaking in an interactive shell.