| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/tree/*name(/*path) |
| route-controller | files |
| route-action | disambiguate |
| fetch-nonce | v2:76b6ac60-8031-7099-1e64-495a3144ec8b |
| current-catalog-service-hash | f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb |
| request-id | BE40:3CB28D:26498F:352BA9:6AFC02A3 |
| html-safe-nonce | 1e1cd658db0231296238202992a378243c02c4fa64e36321d873cf28b699fa67 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTQwOjNDQjI4RDoyNjQ5OEY6MzUyQkE5OjZBRkMwMkEzIiwidmlzaXRvcl9pZCI6IjE5NDkzNzMwNjA1ODY2Njg3MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5e2f38dd6a13fbf2b3d5becf977e7849b76ac3bd2bbb8111f52868f32e2e8c39 |
| hovercard-subject-tag | repository:119226570 |
| github-keyboard-shortcuts | repository,source-code,file-tree,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | // |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/PythonNuts/wtfpython/tree/master |
| twitter:image | https://opengraph.githubassets.com/ef76c5e88a4b4f3bdbf29f2bf3ca373e1198d001d94996edc0a39039063a1329/PythonNuts/wtfpython |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ef76c5e88a4b4f3bdbf29f2bf3ca373e1198d001d94996edc0a39039063a1329/PythonNuts/wtfpython |
| og:image:alt | A collection of surprising Python snippets and lesser-known features. - PythonNuts/wtfpython |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fa74413a1d84dac536fcca0740780bcbd3207bafec0e51873b73ff8e8cca032f |
| turbo-cache-control | no-cache |
| go-import | github.com/PythonNuts/wtfpython git https://github.com/PythonNuts/wtfpython.git |
| octolytics-dimension-user_id | 9855267 |
| octolytics-dimension-user_login | PythonNuts |
| octolytics-dimension-repository_id | 119226570 |
| octolytics-dimension-repository_nwo | PythonNuts/wtfpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 101684374 |
| octolytics-dimension-repository_parent_nwo | satwikkansal/wtfpython |
| octolytics-dimension-repository_network_root_id | 101684374 |
| octolytics-dimension-repository_network_root_nwo | satwikkansal/wtfpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b3b5633a74535d9c23385512d534c66c8fde1907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://redirect.github.com/PythonNuts/wtfpython/tree/master#start-of-content |
| https://redirect.github.com/ |
| Sign in | https://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPythonNuts%2Fwtfpython%2Ftree%2Fmaster |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPythonNuts%2Fwtfpython%2Ftree%2Fmaster |
| Sign up | https://redirect.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=PythonNuts%2Fwtfpython |
| Reload | https://redirect.github.com/PythonNuts/wtfpython/tree/master |
| Reload | https://redirect.github.com/PythonNuts/wtfpython/tree/master |
| Reload | https://redirect.github.com/PythonNuts/wtfpython/tree/master |
| PythonNuts | https://redirect.github.com/PythonNuts |
| wtfpython | https://redirect.github.com/PythonNuts/wtfpython |
| Code | https://redirect.github.com/PythonNuts/wtfpython |
| Pull requests | https://redirect.github.com/PythonNuts/wtfpython/pulls |
| Actions | https://redirect.github.com/PythonNuts/wtfpython/actions |
| Projects | https://redirect.github.com/PythonNuts/wtfpython/projects |
| Wiki | https://redirect.github.com/PythonNuts/wtfpython/wiki |
| Security and quality | https://redirect.github.com/PythonNuts/wtfpython/security |
| Insights | https://redirect.github.com/PythonNuts/wtfpython/pulse |
| https://redirect.github.com/PythonNuts/wtfpython |
| wtfpython | https://redirect.github.com/PythonNuts/wtfpython |
| satwikkansal/wtfpython | https://redirect.github.com/satwikkansal/wtfpython |
| Notifications | https://redirect.github.com/login?return_to=%2FPythonNuts%2Fwtfpython |
| Fork0 (0) | https://redirect.github.com/login?return_to=%2FPythonNuts%2Fwtfpython |
| Star0 (0) | https://redirect.github.com/login?return_to=%2FPythonNuts%2Fwtfpython |
| Readme | https://redirect.github.com/PythonNuts/wtfpython/tree/master#readme-ov-file |
| WTFPL license | https://redirect.github.com/PythonNuts/wtfpython/tree/master#WTFPL-1-ov-file |
| Code of conduct | https://redirect.github.com/PythonNuts/wtfpython/tree/master#coc-ov-file |
| Contributing | https://redirect.github.com/PythonNuts/wtfpython/tree/master#contributing-ov-file |
| Activity | https://redirect.github.com/PythonNuts/wtfpython/activity |
| Custom properties | https://redirect.github.com/PythonNuts/wtfpython/custom-properties |
| 0 forks | https://redirect.github.com/PythonNuts/wtfpython/forks |
| Report repository | https://redirect.github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FPythonNuts%2Fwtfpython&report=PythonNuts+%28user%29 |
| Branches | https://redirect.github.com/PythonNuts/wtfpython/branches |
| Tags | https://redirect.github.com/PythonNuts/wtfpython/tags |
| https://redirect.github.com/PythonNuts/wtfpython/branches |
| https://redirect.github.com/PythonNuts/wtfpython/tags |
| 201 Commits | https://redirect.github.com/PythonNuts/wtfpython/commits/master/ |
| https://redirect.github.com/PythonNuts/wtfpython/commits/master/ |
| images | https://redirect.github.com/PythonNuts/wtfpython/tree/master/images |
| images | https://redirect.github.com/PythonNuts/wtfpython/tree/master/images |
| irrelevant | https://redirect.github.com/PythonNuts/wtfpython/tree/master/irrelevant |
| irrelevant | https://redirect.github.com/PythonNuts/wtfpython/tree/master/irrelevant |
| wtfpython-pypi | https://redirect.github.com/PythonNuts/wtfpython/tree/master/wtfpython-pypi |
| wtfpython-pypi | https://redirect.github.com/PythonNuts/wtfpython/tree/master/wtfpython-pypi |
| .gitattributes | https://redirect.github.com/PythonNuts/wtfpython/blob/master/.gitattributes |
| .gitattributes | https://redirect.github.com/PythonNuts/wtfpython/blob/master/.gitattributes |
| .gitignore | https://redirect.github.com/PythonNuts/wtfpython/blob/master/.gitignore |
| .gitignore | https://redirect.github.com/PythonNuts/wtfpython/blob/master/.gitignore |
| .npmignore | https://redirect.github.com/PythonNuts/wtfpython/blob/master/.npmignore |
| .npmignore | https://redirect.github.com/PythonNuts/wtfpython/blob/master/.npmignore |
| CONTRIBUTING.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/CONTRIBUTING.md |
| CONTRIBUTING.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/CONTRIBUTING.md |
| CONTRIBUTORS.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/CONTRIBUTORS.md |
| CONTRIBUTORS.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/CONTRIBUTORS.md |
| LICENSE | https://redirect.github.com/PythonNuts/wtfpython/blob/master/LICENSE |
| LICENSE | https://redirect.github.com/PythonNuts/wtfpython/blob/master/LICENSE |
| README.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/README.md |
| README.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/README.md |
| code-of-conduct.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/code-of-conduct.md |
| code-of-conduct.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/code-of-conduct.md |
| mixed_tabs_and_spaces.py | https://redirect.github.com/PythonNuts/wtfpython/blob/master/mixed_tabs_and_spaces.py |
| mixed_tabs_and_spaces.py | https://redirect.github.com/PythonNuts/wtfpython/blob/master/mixed_tabs_and_spaces.py |
| package.json | https://redirect.github.com/PythonNuts/wtfpython/blob/master/package.json |
| package.json | https://redirect.github.com/PythonNuts/wtfpython/blob/master/package.json |
| wtfpython | https://redirect.github.com/PythonNuts/wtfpython/blob/master/wtfpython |
| wtfpython | https://redirect.github.com/PythonNuts/wtfpython/blob/master/wtfpython |
| README | https://redirect.github.com/PythonNuts/wtfpython/tree/master |
| Code of conduct | https://redirect.github.com/PythonNuts/wtfpython/tree/master |
| Contributing | https://redirect.github.com/PythonNuts/wtfpython/tree/master |
| WTFPL license | https://redirect.github.com/PythonNuts/wtfpython/tree/master |
| https://redirect.github.com/PythonNuts/wtfpython/blob/master/images/logo.png |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-what-the-fck-python-- |
| http://www.wtfpl.net |
| here | https://github.com/satwikkansal/wtfpython/releases/ |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#table-of-contents |
| Structure of the Examples | https://redirect.github.com/PythonNuts/wtfpython/tree/master#structure-of-the-examples |
| Usage | https://redirect.github.com/PythonNuts/wtfpython/tree/master#usage |
| 👀 Examples | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-examples |
| Section: Strain your brain! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-strain-your-brain |
| ▶ Strings can be tricky sometimes * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-strings-can-be-tricky-sometimes- |
| ▶ Time for some hash brownies! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-time-for-some-hash-brownies |
| ▶ Return return everywhere! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-return-return-everywhere |
| ▶ Deep down, we're all the same. * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-deep-down-were-all-the-same- |
| ▶ For what? | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-for-what |
| ▶ Evaluation time discrepancy | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-evaluation-time-discrepancy |
| ▶ is is not what it is! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-is-is-not-what-it-is |
| ▶ A tic-tac-toe where X wins in the first attempt! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-a-tic-tac-toe-where-x-wins-in-the-first-attempt |
| ▶ The sticky output function | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-sticky-output-function |
| ▶ is not ... is not is (not ...) | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-is-not--is-not-is-not- |
| ▶ The surprising comma | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-surprising-comma |
| ▶ Backslashes at the end of string | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-backslashes-at-the-end-of-string |
| ▶ not knot! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-not-knot |
| ▶ Half triple-quoted strings | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-half-triple-quoted-strings |
| ▶ Midnight time doesn't exist? | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-midnight-time-doesnt-exist |
| ▶ What's wrong with booleans? | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-whats-wrong-with-booleans |
| ▶ Class attributes and instance attributes | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-class-attributes-and-instance-attributes |
| ▶ yielding None | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-yielding-none |
| ▶ Mutating the immutable! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-mutating-the-immutable |
| ▶ The disappearing variable from outer scope | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-disappearing-variable-from-outer-scope |
| ▶ When True is actually False | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-when-true-is-actually-false |
| ▶ From filled to None in one instruction... | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-from-filled-to-none-in-one-instruction |
| ▶ Subclass relationships * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-subclass-relationships- |
| ▶ The mysterious key type conversion * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-mysterious-key-type-conversion- |
| ▶ Let's see if you can guess this? | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-lets-see-if-you-can-guess-this |
| Section: Appearances are deceptive! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-appearances-are-deceptive |
| ▶ Skipping lines? | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-skipping-lines |
| ▶ Teleportation * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-teleportation- |
| ▶ Well, something is fishy... | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-well-something-is-fishy |
| Section: Watch out for the landmines! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-watch-out-for-the-landmines |
| ▶ Modifying a dictionary while iterating over it | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-modifying-a-dictionary-while-iterating-over-it |
| ▶ Stubborn del operator * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-stubborn-del-operator- |
| ▶ Deleting a list item while iterating | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-deleting-a-list-item-while-iterating |
| ▶ Loop variables leaking out! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-loop-variables-leaking-out |
| ▶ Beware of default mutable arguments! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-beware-of-default-mutable-arguments |
| ▶ Catching the Exceptions | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-catching-the-exceptions |
| ▶ Same operands, different story! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-same-operands-different-story |
| ▶ The out of scope variable | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-out-of-scope-variable |
| ▶ Be careful with chained operations | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-be-careful-with-chained-operations |
| ▶ Name resolution ignoring class scope | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-name-resolution-ignoring-class-scope |
| ▶ Needle in a Haystack | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-needle-in-a-haystack |
| Section: The Hidden treasures! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-the-hidden-treasures |
| ▶ Okay Python, Can you make me fly? * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-okay-python-can-you-make-me-fly- |
| ▶ goto, but why? * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-goto-but-why- |
| ▶ Brace yourself! * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-brace-yourself- |
| ▶ Let's meet Friendly Language Uncle For Life * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-lets-meet-friendly-language-uncle-for-life- |
| ▶ Even Python understands that love is complicated * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-even-python-understands-that-love-is-complicated- |
| ▶ Yes, it exists! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-yes-it-exists |
| ▶ Inpinity * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-inpinity- |
| ▶ Mangling time! * | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-mangling-time- |
| Section: Miscallaneous | https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-miscallaneous |
| ▶ += is faster | https://redirect.github.com/PythonNuts/wtfpython/tree/master#--is-faster |
| ▶ Let's make a giant string! | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-lets-make-a-giant-string |
| ▶ Explicit typecast of strings | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explicit-typecast-of-strings |
| ▶ Minor Ones | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-minor-ones |
| Contributing | https://redirect.github.com/PythonNuts/wtfpython/tree/master#contributing |
| Acknowledgements | https://redirect.github.com/PythonNuts/wtfpython/tree/master#acknowledgements |
| 🎓 License | https://redirect.github.com/PythonNuts/wtfpython/tree/master#-license |
| Help | https://redirect.github.com/PythonNuts/wtfpython/tree/master#help |
| Want to share wtfpython with friends? | https://redirect.github.com/PythonNuts/wtfpython/tree/master#want-to-share-wtfpython-with-friends |
| Need a pdf version? | https://redirect.github.com/PythonNuts/wtfpython/tree/master#need-a-pdf-version |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#structure-of-the-examples |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-some-fancy-title- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#usage |
| here | https://github.com/satwikkansal/wtfPython |
| wtfpython | https://www.npmjs.com/package/wtfpython |
| wtfpython | https://pypi.python.org/pypi/wtfpython |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-examples |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-strain-your-brain |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-strings-can-be-tricky-sometimes- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-1 |
| https://redirect.github.com/PythonNuts/wtfpython/blob/master/images/string-intern/string_intern.png |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-time-for-some-hash-brownies |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-2 |
| answer | https://stackoverflow.com/a/32211042/4354153 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-return-return-everywhere |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-3 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-deep-down-were-all-the-same- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-4 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-for-what |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-5 |
| Python grammar | https://docs.python.org/3/reference/grammar.html |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-evaluation-time-discrepancy |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-6 |
| generator | https://wiki.python.org/moin/Generators |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-is-is-not-what-it-is |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-7 |
| https://docs.python.org/3/c-api/long.html | https://docs.python.org/3/c-api/long.html |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-a-tic-tac-toe-where-x-wins-in-the-first-attempt |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-8 |
| https://redirect.github.com/PythonNuts/wtfpython/blob/master/images/tic-tac-toe/after_row_initialized.png |
| https://redirect.github.com/PythonNuts/wtfpython/blob/master/images/tic-tac-toe/after_board_initialized.png |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-sticky-output-function |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-9 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-is-not--is-not-is-not- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-10 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-surprising-comma |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-11 |
| fixed in Python 3.6 | https://bugs.python.org/issue9232 |
| this | https://bugs.python.org/issue9232#msg248399 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-backslashes-at-the-end-of-string |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-12 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-not-knot |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-13 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-half-triple-quoted-strings |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-14 |
| string literal concatenation | https://docs.python.org/2/reference/lexical_analysis.html#string-literal-concatenation |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-midnight-time-doesnt-exist |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-15 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-whats-wrong-with-booleans |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-16 |
| answer | https://stackoverflow.com/a/8169049/4354153 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-class-attributes-and-instance-attributes |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-17 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-yielding-none |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-18 |
| https://stackoverflow.com/questions/32139885/yield-in-list-comprehensions-and-generator-expressions | https://stackoverflow.com/questions/32139885/yield-in-list-comprehensions-and-generator-expressions |
| http://bugs.python.org/issue10544 | http://bugs.python.org/issue10544 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-mutating-the-immutable |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-19 |
| https://docs.python.org/2/reference/datamodel.html | https://docs.python.org/2/reference/datamodel.html |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-disappearing-variable-from-outer-scope |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-20 |
| https://docs.python.org/3/reference/compound_stmts.html#except | https://docs.python.org/3/reference/compound_stmts.html#except |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-when-true-is-actually-false |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-21 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-from-filled-to-none-in-one-instruction |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-22 |
| here | http://docs.python.org/2/faq/design.html#why-doesn-t-list-sort-return-the-sorted-list |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-subclass-relationships- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-23 |
| here | https://www.naftaliharris.com/blog/python-subclass-intransitivity/ |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-mysterious-key-type-conversion- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-24 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-lets-see-if-you-can-guess-this |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-25 |
| Python language reference | https://docs.python.org/2/reference/simple_stmts.html#assignment-statements |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-appearances-are-deceptive |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-skipping-lines |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-26 |
| code point | https://en.wikipedia.org/wiki/Code_point |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-teleportation- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-27 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-well-something-is-fishy |
| mixed_tabs_and_spaces.py | https://redirect.github.com/PythonNuts/wtfpython/blob/master/mixed_tabs_and_spaces.py |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-28 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-watch-out-for-the-landmines |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-modifying-a-dictionary-while-iterating-over-it |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-29 |
| thread | https://stackoverflow.com/questions/44763802/bug-in-python-dict |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-stubborn-del-operator- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-30 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-deleting-a-list-item-while-iterating |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-31 |
| thread | https://stackoverflow.com/questions/45946228/what-happens-when-you-try-to-delete-a-list-element-while-iterating-over-it |
| thread | https://stackoverflow.com/questions/45877614/how-to-change-all-the-dictionary-keys-in-a-for-loop-with-d-items |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-loop-variables-leaking-out |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-32 |
| What’s New In Python 3.0 | https://docs.python.org/3/whatsnew/3.0.html |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-beware-of-default-mutable-arguments |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-33 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-catching-the-exceptions |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-34 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-same-operands-different-story |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-35 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-the-out-of-scope-variable |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-36 |
| this | http://sebastianraschka.com/Articles/2014_python_scope_and_namespaces.html |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-be-careful-with-chained-operations |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-37 |
| https://docs.python.org/2/reference/expressions.html#not-in | https://docs.python.org/2/reference/expressions.html#not-in |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-name-resolution-ignoring-class-scope |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-38 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-needle-in-a-haystack |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-39 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-the-hidden-treasures |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-okay-python-can-you-make-me-fly- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-40 |
| classic XKCD comic | http://xkcd.com/353/ |
| code | https://github.com/python/cpython/blob/master/Lib/antigravity.py#L7-L17 |
| XKCD's geohashing algorithm | https://xkcd.com/426/ |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-goto-but-why- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-41 |
| announced | https://mail.python.org/pipermail/python-announce-list/2004-April/002982.html |
| reason | https://docs.python.org/3/faq/design.html#why-is-there-no-goto |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-brace-yourself- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-42 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-lets-meet-friendly-language-uncle-for-life- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-43 |
| PEP-401 | https://www.python.org/dev/peps/pep-0401/ |
| here | https://www.python.org/dev/peps/pep-0401/ |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-even-python-understands-that-love-is-complicated- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-44 |
| PEP 20 | https://www.python.org/dev/peps/pep-0020 |
| this.py | https://hg.python.org/cpython/file/c3896275c0f6/Lib/this.py |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-yes-it-exists |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-45 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-inpinity- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-46 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-mangling-time- |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-47 |
| Name Mangling | https://en.wikipedia.org/wiki/Name_mangling |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#section-miscallaneous |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#--is-faster |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-48 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-lets-make-a-giant-string |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-49 |
| timeit | https://docs.python.org/3/library/timeit.html |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explicit-typecast-of-strings |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-explanation-50 |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-minor-ones |
| sequences | https://docs.python.org/3/glossary.html#term-sequence |
| thread | https://stackoverflow.com/questions/3654830/why-are-there-no-and-operators-in-python |
| Global Interpreter Lock | https://wiki.python.org/moin/GlobalInterpreterLock |
| multiprocessing | https://docs.python.org/2/library/multiprocessing.html |
| interesting story | http://chris.improbable.org/2014/8/25/adventures-in-unicode-digits/ |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#contributing |
| CONTRIBUTING.md | https://redirect.github.com/PythonNuts/wtfpython/blob/master/CONTRIBUTING.md |
| issue | https://github.com/satwikkansal/wtfpython/issues/new |
| channel | https://gitter.im/wtfpython/Lobby |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#acknowledgements |
| wtfjs | https://github.com/denysdovhan/wtfjs |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#some-nice-links |
| https://www.youtube.com/watch?v=sH4XF6pKKmk | https://www.youtube.com/watch?v=sH4XF6pKKmk |
| https://www.reddit.com/r/Python/comments/3cu6ej/what_are_some_wtf_things_about_python | https://www.reddit.com/r/Python/comments/3cu6ej/what_are_some_wtf_things_about_python |
| https://sopython.com/wiki/Common_Gotchas_In_Python | https://sopython.com/wiki/Common_Gotchas_In_Python |
| https://stackoverflow.com/questions/530530/python-2-x-gotchas-and-landmines | https://stackoverflow.com/questions/530530/python-2-x-gotchas-and-landmines |
| https://stackoverflow.com/questions/1011431/common-pitfalls-in-python | https://stackoverflow.com/questions/1011431/common-pitfalls-in-python |
| https://www.python.org/doc/humor/ | https://www.python.org/doc/humor/ |
| https://www.satwikkansal.xyz/archives/posts/python/My-Python-archives/ | https://www.satwikkansal.xyz/archives/posts/python/My-Python-archives/ |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#-license |
| http://www.wtfpl.net |
| Satwik Kansal | https://satwikkansal.xyz |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#help |
| https://redirect.github.com/PythonNuts/wtfpython/tree/master#want-to-share-wtfpython-with-friends |
| Twitter | https://twitter.com/intent/tweet?url=https://github.com/satwikkansal/wtfpython&hastags=python,wtfpython |
| Linkedin | https://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://redirect.github.com/PythonNuts/wtfpython/tree/master#need-a-pdf-version |
| here | https://satwikkansal.xyz/wtfpython-pdf/ |
| Readme | https://redirect.github.com/PythonNuts/wtfpython/tree/master#readme-ov-file |
| WTFPL license | https://redirect.github.com/PythonNuts/wtfpython/tree/master#WTFPL-1-ov-file |
| Code of conduct | https://redirect.github.com/PythonNuts/wtfpython/tree/master#coc-ov-file |
| Contributing | https://redirect.github.com/PythonNuts/wtfpython/tree/master#contributing-ov-file |
| Activity | https://redirect.github.com/PythonNuts/wtfpython/activity |
| Custom properties | https://redirect.github.com/PythonNuts/wtfpython/custom-properties |
| 0 forks | https://redirect.github.com/PythonNuts/wtfpython/forks |
| Report repository | https://redirect.github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FPythonNuts%2Fwtfpython&report=PythonNuts+%28user%29 |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |