, , (, , . ).
, :
x + y
x y
x * y
x / y
x // y
x ** y (xy)
x % y ( (x mod y)
:
abs(x)
divmod(x,y) (x // y, x % y)
pow(x,y [,modulo]) (x ** y) % modulo
round(x,[n]) 10 -n ( )
round() x , 10 n. n , 0. x , Python 3 (, 0.5 0.0, 1.5 2.0). Python 3.
x < y
x > y
x == y
x!= y
x >= y
x <= y
and, or, not , . , :
2< x and 5< y
. .
, : w < x < y < z, w < x and x < y and y < z. , x < y > z, .
( ) :
, . . .
x << y
x >> y
x & y Ȼ
x | y Ȼ
x ^ y Ȼ
~x Ż
Python , . . = , .
, .
|
|
, Python, , . :
s='15.7'
x=float(s)#
i= in t(x)#
print ('s=',s,'x=',x,'i=',i)
, , .
, , , , .
Python .
(tuple) (list). , , - . t=(1,2,,4), : L=[1,2,,4].
Python , . , , . (array) numpy. numpy .
: 0. , 2 0, 1, 2 !
, () , -1 , -2 ..