Thursday, December 3, 2026 | London 10°C · Drizzle
DailyGlimpse

AI

Python's Hidden Easter Egg: The 'Antigravity' Module That Opens xkcd

TechShortDaily 1 min read

Python developers love a good inside joke, and one of the most beloved easter eggs is the antigravity module. When you import it in a Python interactive shell or script, it doesn't actually defy physics—instead, it opens a web browser to a classic xkcd comic titled "Python" (xkcd #353).

The comic humorously depicts a character discovering a module that enables antigravity, only to be told by a colleague that "You just imported antigravity." It's a playful nod to Python's vast standard library and the community's sense of humor.

To try it yourself, simply open a Python terminal and type:

import antigravity

Your default browser will launch to the xkcd comic. No special setup required. This feature has been part of Python for years and continues to delight new programmers who stumble upon it.

While the module itself does nothing functional, it's a charming reminder that programming languages can have a sense of fun. So next time you're debugging or teaching Python, share this easter egg—it's a guaranteed smile.

React