You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[▶ Deleting a list item while iterating over it](#%E2%96%B6-deleting-a-list-item-while-iterating-over-it)
69
+
-[▶ Loop variables leaking out of local scope!](#%E2%96%B6-loop-variables-leaking-out-of-local-scope)
70
+
-[▶ Beware of default mutable arguments!](#%E2%96%B6-beware-of-default-mutable-arguments)
71
+
-[▶ Catching the Exceptions!](#%E2%96%B6-catching-the-exceptions)
72
+
-[▶ Same operands, different story!](#%E2%96%B6-same-operands-different-story)
73
+
-[▶ Using a variable not defined in scope](#%E2%96%B6-using-a-variable-not-defined-in-scope)
74
+
-[▶ Be careful with chained operations](#%E2%96%B6-be-careful-with-chained-operations)
75
+
-[▶ Name resolution ignoring class scope](#%E2%96%B6-name-resolution-ignoring-class-scope)
76
+
-[▶ Needle in a Haystack](#%E2%96%B6-needle-in-a-haystack)
77
+
-[Section: Miscallaneous](#section-miscallaneous)
78
+
-[▶ `+=` is faster](#%E2%96%B6--is-faster)
79
+
-[▶ Let's make a giant string!](#%E2%96%B6-lets-make-a-giant-string)
80
+
-[▶ Explicit typecast of strings](#%E2%96%B6-explicit-typecast-of-strings)
81
+
-[▶ Minor Ones](#%E2%96%B6-minor-ones)
82
+
-[Contributing](#contributing)
83
+
-[Acknowledgements](#acknowledgements)
84
+
-[🎓 License](#-license)
85
+
-[Help](#help)
86
+
-[Want to share wtfPython with friends?](#want-to-share-wtfpython-with-friends)
87
+
-[Need a pdf version?](#need-a-pdf-version)
88
+
89
+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
90
+
17
91
# Structure of the Examples
18
92
19
93
All the examples are structured like below:
@@ -185,7 +259,7 @@ Shouldn't that be 100?
185
259
186
260
---
187
261
188
-
## The Hiddent treasures
262
+
## Section: The Hiddent treasures
189
263
190
264
191
265
### ▶ Okay Python, Can you make me fly? *
@@ -434,7 +508,7 @@ Why did `Yo()._Yo__honey` worked? Only Indian readers would understand.
434
508
435
509
---
436
510
437
-
## Strain your Brain
511
+
## Section: Strain your Brain
438
512
439
513
### ▶ Strings can be tricky sometimes *
440
514
@@ -1456,7 +1530,7 @@ a, b = a[b] = {}, 5
1456
1530
1457
1531
---
1458
1532
1459
-
## Watchout for the landmines!
1533
+
## Section: Watchout for the landmines!
1460
1534
1461
1535
1462
1536
### ▶ Modifying a dictionary while iterating over it
@@ -2008,7 +2082,7 @@ tuple()
2008
2082
2009
2083
---
2010
2084
2011
-
## Miscallaneous
2085
+
## Section: Miscallaneous
2012
2086
2013
2087
2014
2088
### ▶ `+=` is faster
@@ -2213,10 +2287,6 @@ nan
2213
2287
2214
2288
---
2215
2289
2216
-
# TODO: Hell of an example!
2217
-
2218
-
Trying to come up with an example that combines multiple examples discussed above, making it difficult for the reader to guess the output correctly :sweat_smile:.
2219
-
2220
2290
# Contributing
2221
2291
2222
2292
All patches are Welcome! Please see [CONTRIBUTING.md](/CONTRIBUTING.md) for further details.
0 commit comments