|
|
@ -49,11 +49,11 @@ index = <list>.index(<el>) # Returns first index of item. |
|
|
|
Dictionary |
|
|
|
---------- |
|
|
|
```python |
|
|
|
<view> = <dict>.keys() |
|
|
|
<view> = <dict>.values() |
|
|
|
<view> = <dict>.items() |
|
|
|
<value> = <dict>.get(key, default) # Returns default if key does not exist. |
|
|
|
<value> = <dict>.setdefault(key, default) # Same, but also adds item to dict. |
|
|
|
<view> = <dict>.keys() |
|
|
|
<view> = <dict>.values() |
|
|
|
<view> = <dict>.items() |
|
|
|
value = <dict>.get(key, default) # Returns default if key does not exist. |
|
|
|
value = <dict>.setdefault(key, default) # Same, but also adds item to dict. |
|
|
|
<dict>.update(<dict>) |
|
|
|
``` |
|
|
|
|
|
|
|