Operations on Numbers

Operations supported by all numbers

     x + y              Addition
     x - y              Subtraction
     x * y              Multiplication
     x / y              Division
     x ** y             Power 
     x % y              Modulo (x mod y)
     -x                 Negation
     +x                 Unary plus

Integer operations

     x << y             Left shift
     x >> y             Right shift
     x & y              Bitwise and
     x | y              Bitwise or
     x ^ y              Bitwise exclusive or
     ~x                 Bitwise negation
<<< O'Reilly OSCON 2000, Introduction to Python, Slide 52
July 17, 2000, beazley@cs.uchicago.edu
>>>