Skip to content

Commit 6c28e91

Browse files
committed
Dict
1 parent ef1e46a commit 6c28e91

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
@@ -55,17 +55,17 @@ index = <list>.index(<el>) # Returns first index of item.
5555
Dictionary
5656
----------
5757
```python
58-
<view> = <dict>.keys()
59-
<view> = <dict>.values()
60-
<view> = <dict>.items()
6158
<dict>.update(<dict>)
59+
<view> = <dict>.keys()
60+
<view> = <dict>.values()
61+
<view> = <dict>.items()
6262
```
6363

6464
```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.
6969
```
7070

7171
```python

0 commit comments

Comments
 (0)