From fad0ada17c3819ae5508697067ddf2fa23f0f78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 2 Mar 2019 02:50:59 +0100 Subject: [PATCH] Minor fixes --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index af08aa8..e455dd5 100644 --- a/README.md +++ b/README.md @@ -131,8 +131,7 @@ Range ```python = range(to_exclusive) = range(from_inclusive, to_exclusive) - = range(from_inclusive, to_exclusive, step_size) - = range(from_inclusive, to_exclusive, -step_size) + = range(from_inclusive, to_exclusive, ±step_size) ``` ```python @@ -172,11 +171,10 @@ Point(x=1, y=2) Iterator -------- -* **If you want to print the iterator, you need to pass it to the list() function.** -* **In this cheatsheet `''` can also mean an iterator.** +**In this cheatsheet `''` can also mean an iterator.** ```python -from itertools import islice, count, repeat, cycle, chain +from itertools import count, repeat, cycle, chain, islice ``` ```python @@ -228,7 +226,7 @@ Type ``` ```python -from numbers import Number, Integral, Real, Rational, Complex +from numbers import Integral, Rational, Real, Complex, Number = isinstance(, Number) ``` @@ -388,7 +386,8 @@ Numbers ```python = pow(, ) # Or: ** = abs() - = round( [, ndigits]) + = round() + = round(, ±ndigits) ``` ### Constants