Created
September 8, 2017 12:32
-
-
Save Budincsevity/a061aea30cc01496f30bed333fb639b7 to your computer and use it in GitHub Desktop.
Combinations of list items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
stuff = ['a', 'b', 'c'] | |
for L in range(0, len(stuff)+1): | |
for subset in itertools.combinations(stuff, L): | |
print(subset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment