René's URL Explorer Experiment


Title: GitHub - monujee/wtfpython: A collection of surprising Python snippets and lesser-known features.

Open Graph Title: GitHub - monujee/wtfpython: A collection of surprising Python snippets and lesser-known features.

X Title: GitHub - monujee/wtfpython: A collection of surprising Python snippets and lesser-known features.

Description: A collection of surprising Python snippets and lesser-known features. - monujee/wtfpython

Open Graph Description: A collection of surprising Python snippets and lesser-known features. - monujee/wtfpython

X Description: A collection of surprising Python snippets and lesser-known features. - monujee/wtfpython

Opengraph URL: https://github.com/monujee/wtfpython

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:6c2ee9e9-d8d2-ecb6-f4f9-bf6783f07a9c
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-idEDC6:1860A8:14419B6:1C07DB9:696A93B4
html-safe-nonce4e91db23d84614e6b339bbbaf706429ceea873fd0aae9e803a303b3e3d52ec42
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREM2OjE4NjBBODoxNDQxOUI2OjFDMDdEQjk6Njk2QTkzQjQiLCJ2aXNpdG9yX2lkIjoiODYxODc1NTMxODk3MzM3MTMxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac228afdc17c8f413516e0a7baf9ad6ad9f40e66682ca4c8c7534884d8d743838e
hovercard-subject-tagrepository:217493357
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location//
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/monujee/wtfpython
twitter:imagehttps://opengraph.githubassets.com/84b0fa6d7445a4bbf16bfd5e87c07e239676ec0b3ef68a67dfdececde2feea89/monujee/wtfpython
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/84b0fa6d7445a4bbf16bfd5e87c07e239676ec0b3ef68a67dfdececde2feea89/monujee/wtfpython
og:image:altA collection of surprising Python snippets and lesser-known features. - monujee/wtfpython
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4dd496afc954da9c207b2d9fbe86e3074619f565754aa1d9274aec30d9e5b8d7
turbo-cache-controlno-preview
go-importgithub.com/monujee/wtfpython git https://github.com/monujee/wtfpython.git
octolytics-dimension-user_id11229212
octolytics-dimension-user_loginmonujee
octolytics-dimension-repository_id217493357
octolytics-dimension-repository_nwomonujee/wtfpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id101684374
octolytics-dimension-repository_parent_nwosatwikkansal/wtfpython
octolytics-dimension-repository_network_root_id101684374
octolytics-dimension-repository_network_root_nwosatwikkansal/wtfpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release31496a13b80a2f6ad77d6c617ee2255a3545b539
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/monujee/wtfpython#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmonujee%2Fwtfpython
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmonujee%2Fwtfpython
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=monujee%2Fwtfpython
Reloadhttps://github.com/monujee/wtfpython
Reloadhttps://github.com/monujee/wtfpython
Reloadhttps://github.com/monujee/wtfpython
monujee https://github.com/monujee
wtfpythonhttps://github.com/monujee/wtfpython
satwikkansal/wtfpythonhttps://github.com/satwikkansal/wtfpython
Notifications https://github.com/login?return_to=%2Fmonujee%2Fwtfpython
Fork 0 https://github.com/login?return_to=%2Fmonujee%2Fwtfpython
Star 0 https://github.com/login?return_to=%2Fmonujee%2Fwtfpython
WTFPL license https://github.com/monujee/wtfpython/blob/master/LICENSE
0 stars https://github.com/monujee/wtfpython/stargazers
2.7k forks https://github.com/monujee/wtfpython/forks
Branches https://github.com/monujee/wtfpython/branches
Tags https://github.com/monujee/wtfpython/tags
Activity https://github.com/monujee/wtfpython/activity
Star https://github.com/login?return_to=%2Fmonujee%2Fwtfpython
Notifications https://github.com/login?return_to=%2Fmonujee%2Fwtfpython
Code https://github.com/monujee/wtfpython
Pull requests 0 https://github.com/monujee/wtfpython/pulls
Actions https://github.com/monujee/wtfpython/actions
Projects 0 https://github.com/monujee/wtfpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/monujee/wtfpython/security
Please reload this pagehttps://github.com/monujee/wtfpython
Insights https://github.com/monujee/wtfpython/pulse
Code https://github.com/monujee/wtfpython
Pull requests https://github.com/monujee/wtfpython/pulls
Actions https://github.com/monujee/wtfpython/actions
Projects https://github.com/monujee/wtfpython/projects
Security https://github.com/monujee/wtfpython/security
Insights https://github.com/monujee/wtfpython/pulse
Brancheshttps://github.com/monujee/wtfpython/branches
Tagshttps://github.com/monujee/wtfpython/tags
https://github.com/monujee/wtfpython/branches
https://github.com/monujee/wtfpython/tags
247 Commitshttps://github.com/monujee/wtfpython/commits/master/
https://github.com/monujee/wtfpython/commits/master/
imageshttps://github.com/monujee/wtfpython/tree/master/images
imageshttps://github.com/monujee/wtfpython/tree/master/images
irrelevanthttps://github.com/monujee/wtfpython/tree/master/irrelevant
irrelevanthttps://github.com/monujee/wtfpython/tree/master/irrelevant
wtfpython-pypihttps://github.com/monujee/wtfpython/tree/master/wtfpython-pypi
wtfpython-pypihttps://github.com/monujee/wtfpython/tree/master/wtfpython-pypi
.gitattributeshttps://github.com/monujee/wtfpython/blob/master/.gitattributes
.gitattributeshttps://github.com/monujee/wtfpython/blob/master/.gitattributes
.gitignorehttps://github.com/monujee/wtfpython/blob/master/.gitignore
.gitignorehttps://github.com/monujee/wtfpython/blob/master/.gitignore
.npmignorehttps://github.com/monujee/wtfpython/blob/master/.npmignore
.npmignorehttps://github.com/monujee/wtfpython/blob/master/.npmignore
.travis.ymlhttps://github.com/monujee/wtfpython/blob/master/.travis.yml
.travis.ymlhttps://github.com/monujee/wtfpython/blob/master/.travis.yml
CONTRIBUTING.mdhttps://github.com/monujee/wtfpython/blob/master/CONTRIBUTING.md
CONTRIBUTING.mdhttps://github.com/monujee/wtfpython/blob/master/CONTRIBUTING.md
CONTRIBUTORS.mdhttps://github.com/monujee/wtfpython/blob/master/CONTRIBUTORS.md
CONTRIBUTORS.mdhttps://github.com/monujee/wtfpython/blob/master/CONTRIBUTORS.md
LICENSEhttps://github.com/monujee/wtfpython/blob/master/LICENSE
LICENSEhttps://github.com/monujee/wtfpython/blob/master/LICENSE
README.mdhttps://github.com/monujee/wtfpython/blob/master/README.md
README.mdhttps://github.com/monujee/wtfpython/blob/master/README.md
code-of-conduct.mdhttps://github.com/monujee/wtfpython/blob/master/code-of-conduct.md
code-of-conduct.mdhttps://github.com/monujee/wtfpython/blob/master/code-of-conduct.md
mixed_tabs_and_spaces.pyhttps://github.com/monujee/wtfpython/blob/master/mixed_tabs_and_spaces.py
mixed_tabs_and_spaces.pyhttps://github.com/monujee/wtfpython/blob/master/mixed_tabs_and_spaces.py
package.jsonhttps://github.com/monujee/wtfpython/blob/master/package.json
package.jsonhttps://github.com/monujee/wtfpython/blob/master/package.json
wtfpythonhttps://github.com/monujee/wtfpython/blob/master/wtfpython
wtfpythonhttps://github.com/monujee/wtfpython/blob/master/wtfpython
READMEhttps://github.com/monujee/wtfpython
Code of conducthttps://github.com/monujee/wtfpython
Contributinghttps://github.com/monujee/wtfpython
WTFPL licensehttps://github.com/monujee/wtfpython
https://github.com/monujee/wtfpython/blob/master/images/logo.png
https://github.com/monujee/wtfpython#what-the-fck-python-
http://www.wtfpl.net
Chinese 中文https://github.com/leisurelicht/wtfpython-cn
herehttps://github.com/satwikkansal/wtfpython/releases/
https://github.com/monujee/wtfpython#table-of-contents
Structure of the Exampleshttps://github.com/monujee/wtfpython#structure-of-the-examples
Usagehttps://github.com/monujee/wtfpython#usage
👀 Exampleshttps://github.com/monujee/wtfpython#-examples
Section: Strain your brain!https://github.com/monujee/wtfpython#section-strain-your-brain
▶ Strings can be tricky sometimes *https://github.com/monujee/wtfpython#-strings-can-be-tricky-sometimes-
▶ Time for some hash brownies!https://github.com/monujee/wtfpython#-time-for-some-hash-brownies
▶ Return return everywhere!https://github.com/monujee/wtfpython#-return-return-everywhere
▶ Deep down, we're all the same. *https://github.com/monujee/wtfpython#-deep-down-were-all-the-same-
▶ For what?https://github.com/monujee/wtfpython#-for-what
▶ Evaluation time discrepancyhttps://github.com/monujee/wtfpython#-evaluation-time-discrepancy
▶ is is not what it is!https://github.com/monujee/wtfpython#-is-is-not-what-it-is
▶ A tic-tac-toe where X wins in the first attempt!https://github.com/monujee/wtfpython#-a-tic-tac-toe-where-x-wins-in-the-first-attempt
▶ The sticky output functionhttps://github.com/monujee/wtfpython#-the-sticky-output-function
▶ is not ... is not is (not ...)https://github.com/monujee/wtfpython#-is-not--is-not-is-not-
▶ The surprising commahttps://github.com/monujee/wtfpython#-the-surprising-comma
▶ Backslashes at the end of stringhttps://github.com/monujee/wtfpython#-backslashes-at-the-end-of-string
▶ not knot!https://github.com/monujee/wtfpython#-not-knot
▶ Half triple-quoted stringshttps://github.com/monujee/wtfpython#-half-triple-quoted-strings
▶ Midnight time doesn't exist?https://github.com/monujee/wtfpython#-midnight-time-doesnt-exist
▶ What's wrong with booleans?https://github.com/monujee/wtfpython#-whats-wrong-with-booleans
▶ Class attributes and instance attributeshttps://github.com/monujee/wtfpython#-class-attributes-and-instance-attributes
▶ yielding Nonehttps://github.com/monujee/wtfpython#-yielding-none
▶ Mutating the immutable!https://github.com/monujee/wtfpython#-mutating-the-immutable
▶ The disappearing variable from outer scopehttps://github.com/monujee/wtfpython#-the-disappearing-variable-from-outer-scope
▶ When True is actually Falsehttps://github.com/monujee/wtfpython#-when-true-is-actually-false
▶ From filled to None in one instruction...https://github.com/monujee/wtfpython#-from-filled-to-none-in-one-instruction
▶ Subclass relationships *https://github.com/monujee/wtfpython#-subclass-relationships-
▶ The mysterious key type conversion *https://github.com/monujee/wtfpython#-the-mysterious-key-type-conversion-
▶ Let's see if you can guess this?https://github.com/monujee/wtfpython#-lets-see-if-you-can-guess-this
Section: Appearances are deceptive!https://github.com/monujee/wtfpython#section-appearances-are-deceptive
▶ Skipping lines?https://github.com/monujee/wtfpython#-skipping-lines
▶ Teleportation *https://github.com/monujee/wtfpython#-teleportation-
▶ Well, something is fishy...https://github.com/monujee/wtfpython#-well-something-is-fishy
Section: Watch out for the landmines!https://github.com/monujee/wtfpython#section-watch-out-for-the-landmines
▶ Modifying a dictionary while iterating over ithttps://github.com/monujee/wtfpython#-modifying-a-dictionary-while-iterating-over-it
▶ Stubborn del operator *https://github.com/monujee/wtfpython#-stubborn-del-operator-
▶ Deleting a list item while iteratinghttps://github.com/monujee/wtfpython#-deleting-a-list-item-while-iterating
▶ Loop variables leaking out!https://github.com/monujee/wtfpython#-loop-variables-leaking-out
▶ Beware of default mutable arguments!https://github.com/monujee/wtfpython#-beware-of-default-mutable-arguments
▶ Catching the Exceptionshttps://github.com/monujee/wtfpython#-catching-the-exceptions
▶ Same operands, different story!https://github.com/monujee/wtfpython#-same-operands-different-story
▶ The out of scope variablehttps://github.com/monujee/wtfpython#-the-out-of-scope-variable
▶ Be careful with chained operationshttps://github.com/monujee/wtfpython#-be-careful-with-chained-operations
▶ Name resolution ignoring class scopehttps://github.com/monujee/wtfpython#-name-resolution-ignoring-class-scope
▶ Needle in a Haystackhttps://github.com/monujee/wtfpython#-needle-in-a-haystack
▶ Yielding from... return!https://github.com/monujee/wtfpython#-yielding-from-return
Section: The Hidden treasures!https://github.com/monujee/wtfpython#section-the-hidden-treasures
▶ Okay Python, Can you make me fly? *https://github.com/monujee/wtfpython#-okay-python-can-you-make-me-fly-
▶ goto, but why? *https://github.com/monujee/wtfpython#-goto-but-why-
▶ Brace yourself! *https://github.com/monujee/wtfpython#-brace-yourself-
▶ Let's meet Friendly Language Uncle For Life *https://github.com/monujee/wtfpython#-lets-meet-friendly-language-uncle-for-life-
▶ Even Python understands that love is complicated *https://github.com/monujee/wtfpython#-even-python-understands-that-love-is-complicated-
▶ Yes, it exists!https://github.com/monujee/wtfpython#-yes-it-exists
▶ Inpinity *https://github.com/monujee/wtfpython#-inpinity-
▶ Mangling time! *https://github.com/monujee/wtfpython#-mangling-time-
Section: Miscellaneoushttps://github.com/monujee/wtfpython#section-miscellaneous
▶ += is fasterhttps://github.com/monujee/wtfpython#--is-faster
▶ Let's make a giant string!https://github.com/monujee/wtfpython#-lets-make-a-giant-string
▶ Explicit typecast of stringshttps://github.com/monujee/wtfpython#-explicit-typecast-of-strings
▶ Minor Oneshttps://github.com/monujee/wtfpython#-minor-ones
Contributinghttps://github.com/monujee/wtfpython#contributing
Acknowledgementshttps://github.com/monujee/wtfpython#acknowledgements
🎓 Licensehttps://github.com/monujee/wtfpython#-license
Helphttps://github.com/monujee/wtfpython#help
Want to share wtfpython with friends?https://github.com/monujee/wtfpython#want-to-share-wtfpython-with-friends
Need a pdf version?https://github.com/monujee/wtfpython#need-a-pdf-version
https://github.com/monujee/wtfpython#structure-of-the-examples
https://github.com/monujee/wtfpython#-some-fancy-title-
https://github.com/monujee/wtfpython#-explanation
https://github.com/monujee/wtfpython#usage
herehttps://github.com/satwikkansal/wtfPython
wtfpythonhttps://www.npmjs.com/package/wtfpython
wtfpythonhttps://pypi.python.org/pypi/wtfpython
https://github.com/monujee/wtfpython#-examples
https://github.com/monujee/wtfpython#section-strain-your-brain
https://github.com/monujee/wtfpython#-strings-can-be-tricky-sometimes-
https://github.com/monujee/wtfpython#-explanation-1
herehttps://github.com/python/cpython/blob/3.6/Objects/codeobject.c#L19
https://github.com/monujee/wtfpython/blob/master/images/string-intern/string_intern.png
peephole optimizationhttps://en.wikipedia.org/wiki/Peephole_optimization
Here'shttps://github.com/python/cpython/blob/3.6/Python/peephole.c#L288
https://github.com/monujee/wtfpython#-time-for-some-hash-brownies
https://github.com/monujee/wtfpython#-explanation-2
answerhttps://stackoverflow.com/a/32211042/4354153
https://github.com/monujee/wtfpython#-return-return-everywhere
https://github.com/monujee/wtfpython#-explanation-3
https://github.com/monujee/wtfpython#-deep-down-were-all-the-same-
https://github.com/monujee/wtfpython#-explanation-4
https://github.com/monujee/wtfpython#-for-what
https://github.com/monujee/wtfpython#-explanation-5
Python grammarhttps://docs.python.org/3/reference/grammar.html
https://github.com/monujee/wtfpython#-evaluation-time-discrepancy
https://github.com/monujee/wtfpython#-explanation-6
generatorhttps://wiki.python.org/moin/Generators
https://github.com/monujee/wtfpython#-is-is-not-what-it-is
https://github.com/monujee/wtfpython#-explanation-7
https://docs.python.org/3/c-api/long.htmlhttps://docs.python.org/3/c-api/long.html
https://github.com/monujee/wtfpython#-a-tic-tac-toe-where-x-wins-in-the-first-attempt
https://github.com/monujee/wtfpython#-explanation-8
https://github.com/monujee/wtfpython/blob/master/images/tic-tac-toe/after_row_initialized.png
https://github.com/monujee/wtfpython/blob/master/images/tic-tac-toe/after_board_initialized.png
thishttps://github.com/satwikkansal/wtfpython/issues/68
https://github.com/monujee/wtfpython#-the-sticky-output-function
https://github.com/monujee/wtfpython#-explanation-9
https://github.com/monujee/wtfpython#-is-not--is-not-is-not-
https://github.com/monujee/wtfpython#-explanation-10
https://github.com/monujee/wtfpython#-the-surprising-comma
https://github.com/monujee/wtfpython#-explanation-11
fixed in Python 3.6https://bugs.python.org/issue9232
thishttps://bugs.python.org/issue9232#msg248399
https://github.com/monujee/wtfpython#-backslashes-at-the-end-of-string
https://github.com/monujee/wtfpython#-explanation-12
https://github.com/monujee/wtfpython#-not-knot
https://github.com/monujee/wtfpython#-explanation-13
https://github.com/monujee/wtfpython#-half-triple-quoted-strings
https://github.com/monujee/wtfpython#-explanation-14
string literal concatenationhttps://docs.python.org/2/reference/lexical_analysis.html#string-literal-concatenation
https://github.com/monujee/wtfpython#-midnight-time-doesnt-exist
https://github.com/monujee/wtfpython#-explanation-15
https://github.com/monujee/wtfpython#-whats-wrong-with-booleans
https://github.com/monujee/wtfpython#-explanation-16
answerhttps://stackoverflow.com/a/8169049/4354153
https://github.com/monujee/wtfpython#-class-attributes-and-instance-attributes
https://github.com/monujee/wtfpython#-explanation-17
https://github.com/monujee/wtfpython#-yielding-none
https://github.com/monujee/wtfpython#-explanation-18
https://stackoverflow.com/questions/32139885/yield-in-list-comprehensions-and-generator-expressionshttps://stackoverflow.com/questions/32139885/yield-in-list-comprehensions-and-generator-expressions
http://bugs.python.org/issue10544http://bugs.python.org/issue10544
https://github.com/monujee/wtfpython#-mutating-the-immutable
https://github.com/monujee/wtfpython#-explanation-19
https://docs.python.org/2/reference/datamodel.htmlhttps://docs.python.org/2/reference/datamodel.html
https://github.com/monujee/wtfpython#-the-disappearing-variable-from-outer-scope
https://github.com/monujee/wtfpython#-explanation-20
https://docs.python.org/3/reference/compound_stmts.html#excepthttps://docs.python.org/3/reference/compound_stmts.html#except
https://github.com/monujee/wtfpython#-when-true-is-actually-false
https://github.com/monujee/wtfpython#-explanation-21
https://github.com/monujee/wtfpython#-from-filled-to-none-in-one-instruction
https://github.com/monujee/wtfpython#-explanation-22
herehttp://docs.python.org/2/faq/design.html#why-doesn-t-list-sort-return-the-sorted-list
https://github.com/monujee/wtfpython#-subclass-relationships-
https://github.com/monujee/wtfpython#-explanation-23
herehttps://www.naftaliharris.com/blog/python-subclass-intransitivity/
https://github.com/monujee/wtfpython#-the-mysterious-key-type-conversion-
https://github.com/monujee/wtfpython#-explanation-24
https://github.com/monujee/wtfpython#-lets-see-if-you-can-guess-this
https://github.com/monujee/wtfpython#-explanation-25
Python language referencehttps://docs.python.org/2/reference/simple_stmts.html#assignment-statements
https://github.com/monujee/wtfpython#section-appearances-are-deceptive
https://github.com/monujee/wtfpython#-skipping-lines
https://github.com/monujee/wtfpython#-explanation-26
code pointhttps://en.wikipedia.org/wiki/Code_point
https://github.com/monujee/wtfpython#-teleportation-
https://github.com/monujee/wtfpython#-explanation-27
https://github.com/monujee/wtfpython#-well-something-is-fishy
mixed_tabs_and_spaces.pyhttps://github.com/monujee/wtfpython/blob/master/mixed_tabs_and_spaces.py
https://github.com/monujee/wtfpython#-explanation-28
https://github.com/monujee/wtfpython#section-watch-out-for-the-landmines
https://github.com/monujee/wtfpython#-modifying-a-dictionary-while-iterating-over-it
https://github.com/monujee/wtfpython#-explanation-29
threadhttps://stackoverflow.com/questions/44763802/bug-in-python-dict
https://github.com/monujee/wtfpython#-stubborn-del-operator-
https://github.com/monujee/wtfpython#-explanation-30
https://github.com/monujee/wtfpython#-deleting-a-list-item-while-iterating
https://github.com/monujee/wtfpython#-explanation-31
threadhttps://stackoverflow.com/questions/45946228/what-happens-when-you-try-to-delete-a-list-element-while-iterating-over-it
threadhttps://stackoverflow.com/questions/45877614/how-to-change-all-the-dictionary-keys-in-a-for-loop-with-d-items
https://github.com/monujee/wtfpython#-loop-variables-leaking-out
https://github.com/monujee/wtfpython#-explanation-32
What’s New In Python 3.0https://docs.python.org/3/whatsnew/3.0.html
https://github.com/monujee/wtfpython#-beware-of-default-mutable-arguments
https://github.com/monujee/wtfpython#-explanation-33
https://github.com/monujee/wtfpython#-catching-the-exceptions
https://github.com/monujee/wtfpython#-explanation-34
https://github.com/monujee/wtfpython#-same-operands-different-story
https://github.com/monujee/wtfpython#-explanation-35
https://github.com/monujee/wtfpython#-the-out-of-scope-variable
https://github.com/monujee/wtfpython#-explanation-36
thishttp://sebastianraschka.com/Articles/2014_python_scope_and_namespaces.html
https://github.com/monujee/wtfpython#-be-careful-with-chained-operations
https://github.com/monujee/wtfpython#-explanation-37
https://docs.python.org/2/reference/expressions.html#not-inhttps://docs.python.org/2/reference/expressions.html#not-in
https://github.com/monujee/wtfpython#-name-resolution-ignoring-class-scope
https://github.com/monujee/wtfpython#-explanation-38
https://github.com/monujee/wtfpython#-needle-in-a-haystack
https://github.com/monujee/wtfpython#-explanation-39
https://github.com/monujee/wtfpython#-yielding-from-return
https://github.com/monujee/wtfpython#-explanation-40
PEP380https://www.python.org/dev/peps/pep-0380/
official docshttps://www.python.org/dev/peps/pep-0380/#enhancements-to-stopiteration
https://github.com/monujee/wtfpython#section-the-hidden-treasures
https://github.com/monujee/wtfpython#-okay-python-can-you-make-me-fly-
https://github.com/monujee/wtfpython#-explanation-41
classic XKCD comichttp://xkcd.com/353/
codehttps://github.com/python/cpython/blob/master/Lib/antigravity.py#L7-L17
XKCD's geohashing algorithmhttps://xkcd.com/426/
https://github.com/monujee/wtfpython#-goto-but-why-
https://github.com/monujee/wtfpython#-explanation-42
announcedhttps://mail.python.org/pipermail/python-announce-list/2004-April/002982.html
reasonhttps://docs.python.org/3/faq/design.html#why-is-there-no-goto
https://github.com/monujee/wtfpython#-brace-yourself-
https://github.com/monujee/wtfpython#-explanation-43
https://github.com/monujee/wtfpython#-lets-meet-friendly-language-uncle-for-life-
https://github.com/monujee/wtfpython#-explanation-44
PEP-401https://www.python.org/dev/peps/pep-0401/
herehttps://www.python.org/dev/peps/pep-0401/
https://github.com/monujee/wtfpython#-even-python-understands-that-love-is-complicated-
https://github.com/monujee/wtfpython#-explanation-45
PEP 20https://www.python.org/dev/peps/pep-0020
this.pyhttps://hg.python.org/cpython/file/c3896275c0f6/Lib/this.py
https://github.com/monujee/wtfpython#-yes-it-exists
https://github.com/monujee/wtfpython#-explanation-46
https://github.com/monujee/wtfpython#-inpinity-
https://github.com/monujee/wtfpython#-explanation-47
https://github.com/monujee/wtfpython#-mangling-time-
https://github.com/monujee/wtfpython#-explanation-48
Name Manglinghttps://en.wikipedia.org/wiki/Name_mangling
https://github.com/monujee/wtfpython#section-miscellaneous
https://github.com/monujee/wtfpython#--is-faster
https://github.com/monujee/wtfpython#-explanation-49
https://github.com/monujee/wtfpython#-lets-make-a-giant-string
https://github.com/monujee/wtfpython#-explanation-50
timeithttps://docs.python.org/3/library/timeit.html
https://github.com/monujee/wtfpython#-explicit-typecast-of-strings
https://github.com/monujee/wtfpython#-explanation-51
https://github.com/monujee/wtfpython#-minor-ones
sequenceshttps://docs.python.org/3/glossary.html#term-sequence
threadhttps://stackoverflow.com/questions/3654830/why-are-there-no-and-operators-in-python
Raymond Hettinger's tweethttps://twitter.com/raymondh/status/1131103570856632321?lang=en
Global Interpreter Lockhttps://wiki.python.org/moin/GlobalInterpreterLock
multiprocessinghttps://docs.python.org/2/library/multiprocessing.html
interesting storyhttp://chris.improbable.org/2014/8/25/adventures-in-unicode-digits/
https://github.com/monujee/wtfpython#contributing
CONTRIBUTING.mdhttps://github.com/monujee/wtfpython/blob/master/CONTRIBUTING.md
issuehttps://github.com/satwikkansal/wtfpython/issues/new
channelhttps://gitter.im/wtfpython/Lobby
https://github.com/monujee/wtfpython#acknowledgements
wtfjshttps://github.com/denysdovhan/wtfjs
https://github.com/monujee/wtfpython#some-nice-links
https://www.youtube.com/watch?v=sH4XF6pKKmkhttps://www.youtube.com/watch?v=sH4XF6pKKmk
https://www.reddit.com/r/Python/comments/3cu6ej/what_are_some_wtf_things_about_pythonhttps://www.reddit.com/r/Python/comments/3cu6ej/what_are_some_wtf_things_about_python
https://sopython.com/wiki/Common_Gotchas_In_Pythonhttps://sopython.com/wiki/Common_Gotchas_In_Python
https://stackoverflow.com/questions/530530/python-2-x-gotchas-and-landmineshttps://stackoverflow.com/questions/530530/python-2-x-gotchas-and-landmines
https://stackoverflow.com/questions/1011431/common-pitfalls-in-pythonhttps://stackoverflow.com/questions/1011431/common-pitfalls-in-python
https://www.python.org/doc/humor/https://www.python.org/doc/humor/
https://www.codementor.io/satwikkansal/python-practices-for-efficient-code-performance-memory-and-usability-aze6oiq65https://www.codementor.io/satwikkansal/python-practices-for-efficient-code-performance-memory-and-usability-aze6oiq65
https://github.com/monujee/wtfpython#-license
http://www.wtfpl.net
Satwik Kansalhttps://satwikkansal.xyz
https://github.com/monujee/wtfpython#help
https://github.com/monujee/wtfpython#surprise-your-geeky-pythonist-friends
Twitterhttps://twitter.com/intent/tweet?url=https://github.com/satwikkansal/wtfpython&hastags=python,wtfpython
Linkedinhttps://www.linkedin.com/shareArticle?url=https://github.com/satwikkansal&title=What%20the%20f*ck%20Python!&summary=An%20interesting%20collection%20of%20subtle%20and%20tricky%20Python%20snippets.
https://github.com/monujee/wtfpython#need-a-pdf-version
herehttps://satwikkansal.xyz/wtfpython-pdf/
Readme https://github.com/monujee/wtfpython#readme-ov-file
WTFPL license https://github.com/monujee/wtfpython#WTFPL-1-ov-file
Code of conduct https://github.com/monujee/wtfpython#coc-ov-file
Contributing https://github.com/monujee/wtfpython#contributing-ov-file
Please reload this pagehttps://github.com/monujee/wtfpython
Activityhttps://github.com/monujee/wtfpython/activity
0 starshttps://github.com/monujee/wtfpython/stargazers
0 watchinghttps://github.com/monujee/wtfpython/watchers
0 forkshttps://github.com/monujee/wtfpython/forks
Report repository https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fmonujee%2Fwtfpython&report=monujee+%28user%29
Releaseshttps://github.com/monujee/wtfpython/releases
1 tags https://github.com/monujee/wtfpython/tags
Packages 0https://github.com/users/monujee/packages?repo_name=wtfpython
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.