File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,15 @@ Dictionary
65
65
``` python
66
66
value = < dict > .get(key, default = None ) # Returns default if key does not exist.
67
67
value = < dict > .setdefault(key, default = None ) # Same, but also adds default to dict.
68
- < dict > = collections.defaultdict(< type > ) # Creates a dictionary with default value of type.
69
- < dict > = collections.defaultdict(lambda : 1 ) # Creates a dictionary with default value 1.
68
+ < dict > = collections.defaultdict(< type > ) # Creates a dict with default value of type.
69
+ < dict > = collections.defaultdict(lambda : 1 ) # Creates a dict with default value 1.
70
70
```
71
71
72
72
``` python
73
73
< dict > .update(< dict > ) # Or: dict_a = {**dict_a, **dict_b}.
74
- < dict > = dict (< collection> ) # Initiates a dict from coll. of key-value pairs.
75
- < dict > = dict (zip (keys, values)) # Initiates a dict from two collections.
76
- < dict > = dict .fromkeys(keys [, value]) # Initiates a dict from collection of keys.
74
+ < dict > = dict (< collection> ) # Inits a dict from coll. of key-value pairs.
75
+ < dict > = dict (zip (keys, values)) # Inits a dict from two collections.
76
+ < dict > = dict .fromkeys(keys [, value]) # Inits a dict from collection of keys.
77
77
```
78
78
79
79
``` python
You can’t perform that action at this time.
0 commit comments