4
Last seen 3 years ago
Member for 6 years, 1 month, 28 days
Difficulty Normal
This idea of looking for a substring in the whole string is really good. My original solution had two loops: I split the text into tokens and checked each of those for each word in words. Your solution showed me that I could have done this instead:
def count_words(text, words):
More