-
-
Save JeffersGlass/814a097b04b72c07d4441e848a4e040c to your computer and use it in GitHub Desktop.
This file contains 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
from itertools import permutations | |
filename = "perm.txt" | |
text = input("Please enter the text to be scrambled: ") | |
with open(filename, "w") as outfile: | |
for p in permutations(text, len(text)): | |
for char in p: | |
outfile.write(str(char)) | |
outfile.write("\n") | |
with open(filename, "r") as infile: | |
for line in infile: | |
print(line, end="") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment