What are the Python number types?
This article mainly talks about "what are the digital types of Python". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the Python digital types"?
I. figures
The number types in Python include:
Integer number
Floating point number
Complex number
Fixed precision decimal number
Rational fraction
Set
Boolean type
Infinite integer precision
Various digital built-in functions and modules
Second, built-in mathematical tools
Expression operator:
Operator description yield generator function delivery protocol lambda args:expression generates anonymous functions x if y else z ternary expression x or y logic or (there is a short circuit algorithm) x and y logic and (there is a short circuit algorithm) not x logic non x in x not in y membership x is ydepartment x is not y object entity test x comparison size x | y bit OR, set union x ^ y bit XOR, set symmetry difference x ^ y bit and The set intersection xy moves to the left or to the right, merging and deleting x quotient, x% y, and so on, multiplies the remainder, divides, divides the floor, divides, subtracts, divides, subtracts, divides, divides Call function x.attr calls attribute () tuple, expression, generator [] list, list parsing {} dictionary, collection, collection and dictionary parsing.
Built-in mathematical function
Math
Function | constant indicates instance e natural constant emath.e
2.718281828459045
Inf default value: inf
Nan default value: nan
Pi pi π math.pi
3.141592653589793
Tau6.283185307179586
Acos (x) returns the inverse triangular cosine of x math.acos (math.sqrt (2) / 2)
0.7853981633974483
Acosh (x) returns the inverse hyperbolic cosine function of x
Asin (x) returns the inverse trigonometric sine of x math.asin (0.5)
0.5235987755982989
Asinh (x) returns the inverse hyperbolic sine function of x
Atan (x) returns the inverse trigonometric tangent of x math.atan (1.7320508075688767)
1.0471975511965976
Atan2 (y, x) returns the anti-trigonometric tangent value math.atan2 (2prime1) of xCompy.
1.1071487177940904atanh (x) returns the inverse hyperbolic tangent function of x
The method of ceil (x) rounded up math.ceil (5.2) for I
6.0
Copysign (x, y) if y