Last active
November 10, 2016 19:34
-
-
Save Ruhshan/41286e4df57d3c826ee4b85af31c0ea5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
def all_perm(word): | |
# prints all permutation to a given word | |
for p in list(itertools.permutations(word)): | |
print ''.join(p) | |
all_perm("abcde") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment