Skip to content

Instantly share code, notes, and snippets.

@fforbeck
Created May 30, 2012 13:12
Show Gist options
  • Save fforbeck/2836263 to your computer and use it in GitHub Desktop.
Save fforbeck/2836263 to your computer and use it in GitHub Desktop.
pc_02
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