We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e55db6 commit de6a6c6Copy full SHA for de6a6c6
inherit-python-string/word_count_string.py
@@ -1,11 +1,11 @@
1
class WordCountString(str):
2
- def words(self, separator=" "):
+ def words(self, separator=None):
3
return len(self.split(separator))
4
5
6
# from collections import UserString
7
8
9
# class WordCountString(UserString):
10
-# def words(self, separator=" "):
+# def words(self, separator=None):
11
# return len(self.split(separator))
0 commit comments