13 lines
229 B
Python
13 lines
229 B
Python
|
def word_count(text):
|
|||
|
import re
|
|||
|
a = re.sub("[^А-Яа-я-A-Z-a-z ]", "", text)
|
|||
|
b = list(a)
|
|||
|
for i in b:
|
|||
|
c = b.count(i)
|
|||
|
return b
|
|||
|
|
|||
|
|
|||
|
f = 'Я пришел, я ушел, я нашел'
|
|||
|
|
|||
|
print(word_count(f))
|