Skip to content

Instantly share code, notes, and snippets.

View marcelo-reis's full-sized avatar

Marcelo Alves dos Reis marcelo-reis

  • São Paulo-SP/Brasil
View GitHub Profile
texto = open('alice.txt').read().lower()
from string import punctuation
for c in punctuation:
texto = texto.replace(c, ' ')
texto = texto.split()
dic = {}
for p in texto:
if p not in dic:
dic[p] = 1
else: