From 218be718501eb840805e5575e02e74e7bde16654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 22 Apr 2025 17:47:05 +0200 Subject: [PATCH] Numbers --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eac1b55..540dbb4 100644 --- a/README.md +++ b/README.md @@ -517,7 +517,7 @@ Numbers ### Math ```python -from math import e, pi, inf, nan, isnan # `inf*0` and `nan+1` return nan. +from math import pi, inf, nan, isnan # `inf*0` and `nan+1` return nan. from math import sqrt, factorial # `sqrt(-1)` raises ValueError. from math import sin, cos, tan # Also: asin, degrees, radians. from math import log, log10, log2 # Log accepts base as second arg. @@ -583,7 +583,7 @@ import itertools as it ```python >>> list(it.combinations('abc', 2)) # a b c [('a', 'b'), ('a', 'c'), # a . x x - ('b', 'c'), # b . . x + ('b', 'c') # b . . x ] # c . . . ``` diff --git a/index.html b/index.html index 7e80673..6236140 100644 --- a/index.html +++ b/index.html @@ -476,7 +476,7 @@ Point(x=1, y=2 <num> = sum(<collection>) # Also math.prod(<collection>). -

Math

from math import e, pi, inf, nan, isnan      # `inf*0` and `nan+1` return nan.
+

Math

from math import pi, inf, nan, isnan         # `inf*0` and `nan+1` return nan.
 from math import sqrt, factorial             # `sqrt(-1)` raises ValueError.
 from math import sin, cos, tan               # Also: asin, degrees, radians.
 from math import log, log10, log2            # Log accepts base as second arg.
@@ -523,7 +523,7 @@ shuffle(<list>)                              #
 
>>> list(it.combinations('abc', 2))          #   a  b  c
 [('a', 'b'), ('a', 'c'),                     # a .  x  x
- ('b', 'c'),                                 # b .  .  x
+ ('b', 'c')                                  # b .  .  x
 ]                                            # c .  .  .
 

#Datetime

Provides 'date', 'time', 'datetime' and 'timedelta' classes. All are immutable and hashable.

# $ pip3 install python-dateutil