Skip to content

Grace-codes/python-secrets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Python Secrets

Curated list of all the hidden jokes, easter eggs and secrets in Python

Table of Contents

Easter Eggs

1. Zen of Python

import this

2. Easiest Hello World

import __hello__

3. Braces in python?

from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance

4. Hash of Infinity

>>> hash(float('inf'))
314159
>>> hash(float('nan'))
0

5. Antigravity

import antigravity

6. Friendly Language Uncle For Life

>>> from __future__ import barry_as_FLUFL
>>> 1 != 3
  File "<stdin>", line 1
    1 != 3
       ^
SyntaxError: with Barry as BDFL, use '<>' instead of '!='
>>> 1 <> 3
True

Command Line

1. CLI month calendar

python -m "calendar" 2021 7

For options: python -m "calendar" --help

About

Curated list of all the hidden jokes, easter eggs and secrets in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published