A colossal spectral serpent coiled through a candlelit ruined library, glowing runic code drifting in the air around it

the official unofficial haunting of a language

The Serpent's Tongue

Python is a tongue of old magics that lets you conjure systems swiftly, and bind sprawling code into one obedient familiar.

Conjure the Interactive Shell

Whisper an incantation at the prompt, and the serpent answers in kind.

# Simple arithmetic
>>> 1 / 2
0.5
>>> 2 ** 3
8
>>> 17 / 3   # true division returns a float
5.666666666666667
>>> 17 // 3  # floor division
5

Intuitive Divination

Calculations are simple with the serpent's tongue, and its grammar is unnervingly straightforward: the sigils +, -, * and / work exactly as foretold; parentheses () bind a working into groups.

# Python 3: List comprehensions
>>> specters = ['Banshee', 'Wraith', 'Ghoul']
>>> wailing = [s.upper() for s in specters]
>>> print(wailing)
['BANSHEE', 'WRAITH', 'GHOUL']

>>> list(enumerate(specters))
[(0, 'Banshee'), (1, 'Wraith'), (2, 'Ghoul')]

Compound Familiars

Lists — known as arrays to lesser tongues — are one of the compound forms the serpent understands. They can be indexed, sliced, and bent to your will with built-in rites.

# For loop on a list
>>> numbers = [2, 4, 6, 8]
>>> product = 1
>>> for number in numbers:
...     product = product * number
...
>>> print('The curse multiplies to:', product)
The curse multiplies to: 384

The Expected Flow

The serpent knows the usual rites of control that other tongues speak — if, for, while and range — each carrying its own unsettling twist.

# Python 3: Fibonacci series up to n
>>> def haunt(n):
...     a, b = 0, 1
...     while a < n:
...         print(a, end=' ')
...         a, b = b, a + b
...     print()
>>> haunt(144)
0 1 1 2 3 5 8 13 21 34 55 89

Functions Defined

The heart of extensible sorcery is defining functions. The serpent allows mandatory and optional arguments, keyword offerings, and even arbitrary argument lists.

# Simple output (with Unicode)
>>> print("Hello, I haunt in Python!")
Hello, I haunt in Python!

>>> name = input('Who disturbs my rest?\n')
>>> print(f'Beware, {name}.')
Who disturbs my rest? Traveler
Beware, Traveler.

Quick to Learn

Practitioners of any other tongue can pick up the serpent's speech swiftly, and novices find its clean grammar and indentation easy to master, even by candlelight.

A lantern-lit stone path winding into a misty haunted forest, glowing will-o-the-wisps hovering above the trail

Get Started

Whether you're new to the dark arts or a seasoned conjurer, the serpent's grammar is easy to learn and easier to fall under the spell of.

Start with the Beginner's Guide →
An ancient spellbook with a glowing snake emblem, open on a candlelit altar

Download the Grimoire

Source code and installers are ready for those brave enough to summon them, for every platform under the moon.

Latest: Python 3.14.7 →
Tall stacks of aged scrolls and leather tomes in a dim candlelit library alcove

The Ancient Texts

Documentation for the standard library, alongside tutorials and guides, are preserved online for those who seek them.

docs.python.org →

Whispers from the Crypt

  • Announcing the 2026 PSF Board Election Results!
  • Announcing the 2026 Python Packaging Council Election Results!
  • Announcing the PSF Strategic Plan 2026
  • The 2026 PSF Board Election is Open!
  • Inaugural Python Packaging Council Election: Voting is now open!

Gatherings in the Dark

  • Django on the Med 2026
  • PythonCamp Rügen 2026
  • PyBay 2026
  • PyCon Africa 2026
  • PyCon Estonia 2026
A hooded robed figure seen from behind, reading a glowing spellbook by candlelight

"Some of the things it spots are impressive — probably driven by some introspection and/or type inference, not just the simple pattern matching I'm used to in most of the flake8 ecosystem."

— Peter J. A. Cock, maintainer of BioPython, on keeping code clean and safe

Dark Arts & Their Uses

Web Conjuring

Django, Pyramid, Bottle, Tornado, Flask, Litestar, FastAPI

Spectral Interfaces

tkInter, PyGObject, PyQt, PySide, Kivy, wxPython, DearPyGui

Machine Divination

PyTorch, TensorFlow, scikit-learn, Transformers, Anthropic, LangChain

Arcane Calculations

SciPy, Pandas, IPython

Forging Tools

Buildbot, Trac, Roundup

Warding the Systems

Ansible, Salt, OpenStack, xonsh

An ornate circular sigil of a serpent coiled into a figure-eight, etched in stone and glowing faintly

The Order that Guards the Serpent

The mission of this Order is to promote, protect and advance the serpent's tongue, and to support and grow a diverse, international coven of those who speak it.

A Sound from the Deep

Turn down the torches and let the crypt hum along.