Aluko Kenny

Generation

generate functionSun, 14 May 2023

A bot that can count amount of word

def word_count(phrase): counts = {} words = phrase.split(' ') for word in words: counts[word] = counts.get(word, 0) + 1 return counts word_count('the quick brown fox jumps over the lazy dog.')

Questions about programming?Chat with your personal AI assistant