提交 0e6ddd5a 编写于 作者: F feilong

改进8题+fix2

上级 ecc0c6eb
...@@ -187,7 +187,7 @@ word_info['count'] += 1 ...@@ -187,7 +187,7 @@ word_info['count'] += 1
```python ```python
word_info = word_dict.get(word) word_info = word_dict.get(word)
if not word_info: if word_info is None:
word_info = {'word': word, 'count': 0} word_info = {'word': word, 'count': 0}
word_dict[word] = word_info word_dict[word] = word_info
...@@ -198,7 +198,7 @@ word_info['count'] += 1 ...@@ -198,7 +198,7 @@ word_info['count'] += 1
```python ```python
word_info = word_dict.get(word) word_info = word_dict.get(word)
if not word_info: if word_info is None:
word_info = {'word': word, 'count': 1} word_info = {'word': word, 'count': 1}
word_dict[word] = word_info word_dict[word] = word_info
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册