Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book_src/chapters/dictstring.do.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ print(d['Norway'])
!ec
To extend the dictionary with new values, we can simply write
!bc pycod
d['Germany'] = Berlin
d['Germany'] = 'Berlin'
!ec
Notice this important difference between a list and a dictionary. For a list we had to use `append()` to
add new elements. A dictionary has no `append` method, and to extend it we simply introduce a new key
Expand Down