Operator ^
is a bitwise operator, which does bitwise exclusive or.
The power operator is **
, like 8**3
which equals to 512
.
More Related Contents:
- Sieve of Eratosthenes – Finding Primes Python
- Python math is wrong [duplicate]
- Check if a number is a perfect square
- Convert a number range to another range, maintaining ratio
- How can I convert radians to degrees with Python?
- C and Python – different behaviour of the modulo (%) operation
- How to make scipy.interpolate give an extrapolated result beyond the input range?
- Round float to x decimals?
- Math operations from string [duplicate]
- Difference between the built-in pow() and math.pow() for floats, in Python?
- Python: sort function breaks in the presence of nan
- How can I use numpy.correlate to do autocorrelation?
- How can I quickly estimate the distance between two (latitude, longitude) points?
- Exponentials in python: x**y vs math.pow(x, y)
- Multiply operator applied to list(data structure)
- How to get all combination of n binary value? [duplicate]
- scipy is not optimizing and returns “Desired error not necessarily achieved due to precision loss”
- Linear regression of arrays containing NANs in Python/Numpy
- how can i show an irrational number to 100 decimal places in python?
- Is cube root integer?
- Multiple variables in SciPy’s optimize.minimize
- Rotate point about another point in degrees python
- Python floating-point math is wrong [duplicate]
- Computing Standard Deviation in a stream
- Get all numbers that add up to a number
- How to pad a string with leading zeros in Python 3 [duplicate]
- How to perform bilinear interpolation in Python
- Where can I inspect Python’s math functions?
- How do you get the next value in the floating-point sequence? [duplicate]
- Python cos(90) and cos(270) not 0