Skip to content

Hashim-stack/python-is-weird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

Funny, cursed, and mind-bending Python tricks that make developers laugh and cry at the same time 🐍😈

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages