Guest User

Untitled

a guest
Dec 17th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import re
  2. i = 0
  3. for word in re.split('\W+', open("anna.txt").read()): # В переменной word лежит очередное слово из текста
  4. for word1 in re.split('\W+', open("anna.txt").read()):
  5. if word == word1:
  6. i = i + 1
  7. dictionary [word] = i
  8. print(word)
Add Comment
Please, Sign In to add comment