hnc-vitalii/NHC/Arrays/Dz27,06,2023.py

17 lines
274 B
Python
Raw Normal View History

2023-07-07 19:41:49 +02:00
text = [("Я пришел, я ушел, я нашел")]
def word_count(text):
x = text.split()
y = {}
for i in x:
if i in text:
y[i] += 1
else:
y[i] = 1
return word_count
p = word_count
for p in text:
print(p)