Skip to content

Commit fad0ada

Browse files
committed
Minor fixes
1 parent d27d675 commit fad0ada

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ Range
131131
```python
132132
<range> = range(to_exclusive)
133133
<range> = range(from_inclusive, to_exclusive)
134-
<range> = range(from_inclusive, to_exclusive, step_size)
135-
<range> = range(from_inclusive, to_exclusive, -step_size)
134+
<range> = range(from_inclusive, to_exclusive, ±step_size)
136135
```
137136

138137
```python
@@ -172,11 +171,10 @@ Point(x=1, y=2)
172171

173172
Iterator
174173
--------
175-
* **If you want to print the iterator, you need to pass it to the list() function.**
176-
* **In this cheatsheet `'<collection>'` can also mean an iterator.**
174+
**In this cheatsheet `'<collection>'` can also mean an iterator.**
177175

178176
```python
179-
from itertools import islice, count, repeat, cycle, chain
177+
from itertools import count, repeat, cycle, chain, islice
180178
```
181179

182180
```python
@@ -228,7 +226,7 @@ Type
228226
```
229227

230228
```python
231-
from numbers import Number, Integral, Real, Rational, Complex
229+
from numbers import Integral, Rational, Real, Complex, Number
232230
<bool> = isinstance(<el>, Number)
233231
```
234232

@@ -388,7 +386,8 @@ Numbers
388386
```python
389387
<num> = pow(<num>, <num>) # Or: <num> ** <num>
390388
<real> = abs(<num>)
391-
<real> = round(<real> [, ndigits])
389+
<int> = round(<real>)
390+
<real> = round(<real>, ±ndigits)
392391
```
393392

394393
### Constants

0 commit comments

Comments
 (0)