Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. l = []
  2. for x in range(1, len(s)+1):
  3.     combinations = itertools.combinations(s,x)  # returns a generator, not list
  4.     combinations_list = list(combinations)
  5.     l.append(combinations_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement