python type conversion
function Type conversion Convert x to a floating point number
complex(real [,imag ]) Create a complex number
str(x ) Convert object x to string
repr(x ) Convert object x to expression string
eval(str ) Converts the sequence s to a tuple
list(s ) Converts the sequence s to a list
chr(x ) Convert an integer to a character
unichr(x ) Convert an integer to a Unicode character
ord(x ) Convert a character to its integer value
hex(x ) Convert an integer to a hexadecimal Base string
oct(x) Convert an integer to an octal string
The sequence supports the following operations: Operations Sequence connection s * n , n * s n copies of , n is an integer
s % d String formatting (only strings)
s[i] --
x in s , x not in s Subordination relationship for x in s : Iteration len(s) Length min(s) Minimum element max(s) Maximum element s[i ] = x Reassign s[i] s[ i:j ] = rx
x ^ y . +y
x// y mod y )
-x
abs(x) Absolute value
divmod(x,y) Return (int(x / y ), x % y )
pow(x ,y [,modulo ]) Return (x ** y ) x % modulo
round(x ,[n]) Rounding, n is the decimal point Digits
Yx >x> y is greater thanx == y equal to
x! = Y is not equal to (the same as)
x> = y greater than equal to
x