Skip to content

Commit 3dcdf0c

Browse files
authored
Update characterCount.py
增加pprint
1 parent 4160249 commit 3dcdf0c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

05-dict/characterCount.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pprint
12
message = 'It was a bright cold day in April, and the clocks were striking thirteen.'
23
count = {}
34

@@ -6,3 +7,6 @@
67
count[character] = count.get(character, 0) + 1
78

89
print(count)
10+
pprint.pprint(count)#对比显示
11+
12+

0 commit comments

Comments
 (0)