Created
May 30, 2012 13:12
-
-
Save fforbeck/2836263 to your computer and use it in GitHub Desktop.
pc_02
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
file_characters = open("pc_02.txt", "rt") | |
characters = file_characters.read() | |
file_characters.close() | |
occurrences = {} | |
for l in characters: | |
occurrences[l] = str.count(characters, l) | |
for k, v in occurrences.items(): | |
if v == 1: | |
print(k, v, sep='->') | |
#melhorar código | |
#imprimir permutações das letras para gerar a palavra | |
#perms = list(map("".join, itertools.permutations(especial_letters))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment