Operators in Python

Arithmetic (including // and **), comparison, logical (and, or, not) and the in operator, with interactive labs.

Python tiene los operadores habituales más dos muy suyos: // (división entera) y ** (potencia). Los lógicos se escriben con palabras: and, or, not.

Arithmetic

Comparison and chained comparisons

Devuelven True/False. Y Python permite encadenar: 0 < x < 100.

Logical: and, or, not

The in operator

in comprueba si algo está dentro de una lista, un texto o un diccionario (mira las claves).

Check what you've learned