Skip to content
Code ReadingCount the Words
Break the Code

Count the Words

Write a text for which this function gives the wrong answer.
1def count_words(text):
2 return text.count(" ") + 1