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)