Python playground

Write Python and actually run it, with no install. The first run downloads the interpreter.

Real Python, running in your browser (thanks to Pyodide). You do not need to install anything. The first time you press "Run" the interpreter downloads (~10 MB); after that it is instant.

Editor

Ideas to try

import random, math

# número aleatorio y raíz
n = random.randint(1, 100)
print(n, "->", round(math.sqrt(n), 2))

# diccionario y comprensión
precios = {"pan": 1.2, "leche": 0.9, "huevos": 2.1}
caros = {k: v for k, v in precios.items() if v > 1}
print(caros)

# función recursiva
def factorial(n):
    return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(6))

When you want to learn a topic in depth: Python examples · Python cheat sheet · JavaScript playground