Guest User

Untitled

a guest
Aug 14th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. Python Itertools.Permutations()
  2. >>> print([x for x in itertools.permutations('1234')])
  3. >>> [('1', '2', '3', '4'), ('1', '2', '4', '3'), ('1', '3', '2', '4') ... ]
  4.  
  5. >>> ['1234', '1243', '1324' ... ]
  6.  
  7. list(map("".join, itertools.permutations('1234')))
Add Comment
Please, Sign In to add comment