Skip to content

Commit e41adc0

Browse files
committed
Dictionary
1 parent 264915c commit e41adc0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ Dictionary
6161
```
6262

6363
```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.
6868
```
6969

7070
```python
7171
<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.
7575
```
7676

7777
```python

0 commit comments

Comments
 (0)