Advertisement
tyler569

Untitled

Sep 14th, 2014
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. >>> import itertools
  2. >>> x = {"Milk", "Eggs", "Cookies"}
  3. >>> itertools.permutations(x)
  4. <itertools.permutations object at 0x7f416384ac50>
  5. >>> for i in _: print(i)
  6. ...
  7. ('Eggs', 'Cookies', 'Milk')
  8. ('Eggs', 'Milk', 'Cookies')
  9. ('Cookies', 'Eggs', 'Milk')
  10. ('Cookies', 'Milk', 'Eggs')
  11. ('Milk', 'Eggs', 'Cookies')
  12. ('Milk', 'Cookies', 'Eggs')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement