File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -55,17 +55,17 @@ index = <list>.index(<el>) # Returns first index of item.
55
55
Dictionary
56
56
----------
57
57
``` python
58
- < view> = < dict > .keys()
59
- < view> = < dict > .values()
60
- < view> = < dict > .items()
61
58
< dict > .update(< dict > )
59
+ < view> = < dict > .keys()
60
+ < view> = < dict > .values()
61
+ < view> = < dict > .items()
62
62
```
63
63
64
64
``` python
65
- value = < dict > .get(key, default) # Returns default if key does not exist.
66
- value = < dict > .setdefault(key, default) # Same, but also adds default to dict.
67
- < dict > = collections.defaultdict(< type > ) # Creates a dictionary with default value of type.
68
- < dict > = collections.defaultdict(lambda : 1 ) # Creates a dictionary with default value 1.
65
+ value = < dict > .get(key, default) # Returns default if key does not exist.
66
+ value = < dict > .setdefault(key, default) # Same, but also adds default to dict.
67
+ < dict > = collections.defaultdict(< type > ) # Creates a dictionary with default value of type.
68
+ < dict > = collections.defaultdict(lambda : 1 ) # Creates a dictionary with default value 1.
69
69
```
70
70
71
71
``` python
You can’t perform that action at this time.
0 commit comments