KEYWORDS | KEYWORDS | KEYWORDS | KEYWORDS | KEYWORDS |
---|---|---|---|---|
and | del | from | not | while |
as | elif | global | or | with |
assert | else | if | pass | yield |
break | except | import | ||
class | exec | in | raise | |
continue | finally | is | return | |
def | for | lambda | try |
SYMBOL | MEANING |
---|---|
'<' | strictly less than |
'<=' | less than or equal |
'>' | strictly greater than |
'>=' | greater than or equal |
'==' | equal |
'!=' | not equal |
'is' | object identity |
'is not' | negated object identity |
SYMBOL | MEANING |
---|---|
'x + y' | sum of x and y |
'x - y' | difference of x and y |
'x * y' | product of x and y |
'x / y' | quotient of x and y |
'x // y' | (floored) quotient of x and y |
'x % y' | remainder of x / y |
'-x' x | negated |
'+x' x | unchanged |
'abs(x)' | absolute value or magnitude of x |
'int(x)' x | converted to integer |
'long(x)' | x converted to long integer |
'float(x)' x | converted to floating point |
'complex(re,im)' | a complex number with real part re, imaginary part im. im defaults to zero. |
'c.conjugate()' | conjugate of the complex number c. (Identity on real numbers) |
'divmod(x, y)' | the pair (x // y, x % y) |
'pow(x, y)' | x to the power y |
'x ** y' | x to the power y |