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 @@ -61,17 +61,17 @@ Dictionary
61
61
```
62
62
63
63
``` python
64
- value = < dict > .get(key, default) # Returns default if key does not exist.
65
- value = < dict > .setdefault(key, default) # Same, but also adds default to dict.
66
- < dict > = collections.defaultdict(< type > ) # Creates a dictionary with default value of type.
67
- < dict > = collections.defaultdict(lambda : 1 ) # Creates a dictionary with default value 1.
64
+ value = < dict > .get(key, default) # Returns default if key does not exist.
65
+ value = < dict > .setdefault(key, default) # Same, but also adds default to dict.
66
+ < dict > = collections.defaultdict(< type > ) # Creates a dictionary with default value of type.
67
+ < dict > = collections.defaultdict(lambda : 1 ) # Creates a dictionary with default value 1.
68
68
```
69
69
70
70
``` python
71
71
< dict > .update(< dict > )
72
- < dict > = dict (< list > ) # Initiates a dict from list of key-value pairs.
73
- < dict > = dict (zip (keys, values)) # Initiates a dict from two lists.
74
- < dict > = dict .fromkeys(keys [, value]) # Initiates a dict from list of keys.
72
+ < dict > = dict (< list > ) # Initiates a dict from list of key-value pairs.
73
+ < dict > = dict (zip (keys, values)) # Initiates a dict from two lists.
74
+ < dict > = dict .fromkeys(keys [, value]) # Initiates a dict from list of keys.
75
75
```
76
76
77
77
``` python
You can’t perform that action at this time.
0 commit comments