Browse Source

Dict

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

6
README.md

@ -75,7 +75,7 @@ value = <dict>.setdefault(key, default) # Same, but also adds default to di
``` ```
```python ```python
value = <dict>.pop(key) # Removes item from dictionary. value = <dict>.pop(key) # Removes item from dictionary.
{k: v for k, v in <dict>.items() if k in keys} # Filters dictionary by keys. {k: v for k, v in <dict>.items() if k in keys} # Filters dictionary by keys.
``` ```
@ -221,8 +221,8 @@ from numbers import Number, Integral, Real, Rational, Complex
String String
------ ------
```python ```python
<str> = <str>.strip() # Strips all whitespace characters. <str> = <str>.strip() # Strips all whitespace characters.
<str> = <str>.strip('<chars>') # Strips all passed characters. <str> = <str>.strip('<chars>') # Strips all passed characters.
``` ```
```python ```python

|||||||
100:0
Loading…
Cancel
Save