We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c00e3e commit 2b19b7dCopy full SHA for 2b19b7d
source-code/typing/dict_correct.py
@@ -5,7 +5,7 @@
5
6
7
def word_count(text: str) -> dict[str, int]:
8
- counts: dict[str, int] = dict()
+ counts: dict[str, int] = {}
9
words = re.split(r"\W+", text)
10
for word in words:
11
word = word.lower()
source-code/typing/dict_incorrect_01.py
nr_words = 0
0 commit comments