Python All WAT Snake
Python 3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> all([]) True >>> all([[]]) False >>> all([[[[]]]]) True WAT
A Python console shows surprising results from applying `all()` to increasingly nested empty lists, while a snake gapes in confusion beside a “WAT” speech bubble. The joke highlights how unintuitive Python truth-value behavior can seem, making it useful as a reaction to confusing code or unexpected programming results. EN: A Python console shows surprising results from applying `all()` to increasingly nested empty lists, while a snake gapes in confusion beside a “WAT” speech bubble. The joke highlights how unintuitive Python truth-value behavior can seem, making it useful as a reaction to confusing code or unexpected programming results.
- @profunctor_io / 2664 2019-07-19
- @right_wing_dev_squads / 5622 2023-01-01
- @right_wing_dev_squads / 9499 2024-04-24
- Template
- WAT snake
- Type
- image
- Size
- 632×220 · 25.4 KiB
- Mood
- confused, absurd
- Language
- en
- Added