Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- l = []
- for x in range(1, len(s)+1):
- combinations = itertools.combinations(s,x) # returns a generator, not list
- combinations_list = list(combinations)
- l.append(combinations_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement