We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2da828 commit 5c1e924Copy full SHA for 5c1e924
README.md
@@ -61,14 +61,14 @@ Dictionary
61
```
62
63
```python
64
-del <dict>[key] # Remove an existing key.
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.
69
70
71
+del <dict>[key]
72
<dict>.update(<dict>)
73
<dict> = dict(<list>) # Initiates a dict from list of key-value pairs.
74
<dict> = dict(zip(keys, values)) # Initiates a dict from two lists.
0 commit comments