Browse Source

Dictionary

pull/10/head
Jure Šorn 6 years ago
parent
commit
3a68e558e6
1 changed files with 2 additions and 2 deletions
  1. 4
      README.md

4
README.md

@ -68,12 +68,12 @@ value = <dict>.setdefault(key, default) # Same, but also adds default to di
```
```python
del <dict>[key]
<dict>.update(<dict>)
<dict> = dict(<list>) # Initiates a dict from list of key-value pairs.
<dict> = dict(zip(keys, values)) # Initiates a dict from two lists.
<dict> = dict.fromkeys(keys [, value]) # Initiates a dict from list of keys.
{k: v for k, v in <dict>.items() if k in keys} # Filters a dict by keys.
del <dict>[key] # Removes item from dictionary.
{k: v for k, v in <dict>.items() if k in keys} # Filters dictionary by keys.
```
### Counter

Loading…
Cancel
Save