2.5 Operators

The following tokens are operators:

+       -       *       **      / %
<<      >>      &       |       ^       ~
<       >       <=      >=      ==      !=      <>

The comparison operators <> and != are alternate spellings of the same operator. != is the preferred spelling; <> is obsolescent.


Send comments on this document to python-docs@python.org.