Skip to content

Commit 574a11e

Browse files
Merge pull request #49 from mikjunior/master
append is a list function
2 parents 9422840 + 56f1dd8 commit 574a11e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/correctness/not_using_setdefault_to_initialize_a_dictionary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Although there is nothing wrong with this code, it is unnecessarily verbose. Lat
1717
if "list" not in dictionary:
1818
dictionary["list"] = []
1919
20-
dictionary["list"].append["list_item"]
20+
dictionary["list"].append("list_item")
2121
2222
Best practice
2323
-------------

0 commit comments

Comments
 (0)