Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 851 Bytes

File metadata and controls

74 lines (52 loc) · 851 Bytes

python-is-weird

🐍

A collection of funny, cursed, weird, and surprising Python behaviors.

Features

  • Hidden Python Easter eggs
  • Weird comparisons
  • Mutable default argument trap
  • Boolean math
  • Floating point madness
  • Antigravity comic
  • Secret hello-world module
  • And more chaos 😈

Run

python funny_python.py

Funny Examples

Boolean math

True + True
# 2

NaN madness

x = float("nan")
x == x
# False

Mutable default argument

def add_item(x, arr=[]):
    arr.append(x)
    return arr

Hidden Python Easter Eggs

import this
import antigravity
import __hello__

Warning ⚠️

This repository may cause:

  • confusion
  • laughter
  • existential crisis
  • unexpected debugging trauma

Made with chaos and coffee ☕