โ— Shell
clean mode source โ†—

GitHub - Hashim-stack/python-is-weird: Funny, cursed, and mind-bending Python tricks that make developers laugh and cry at the same time ๐Ÿ๐Ÿ˜ˆ

๐Ÿ

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


Funny Examples

Boolean math

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 โ˜•