aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/resources/tags/loop-remove.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/resources/tags/loop-remove.md b/bot/resources/tags/loop-remove.md
index 14b6fc89b..f43097a2d 100644
--- a/bot/resources/tags/loop-remove.md
+++ b/bot/resources/tags/loop-remove.md
@@ -12,7 +12,7 @@ print(data) # [2, 4] <-- every OTHER item was removed!
```
Inside the loop, an index tracks the current position. If the list is modified, this index may no longer refer to the same element, causing elements to be repeated or skipped.
-Above, `1` is removed, shifting `2` to index *0*. The loop then moves to index *1*, removing `3` (and skipping `2`!).
+In the example above, `1` is removed, shifting `2` to index *0*. The loop then moves to index *1*, removing `3` (and skipping `2`!).
You can avoid this pitfall by:
- using a **list comprehension** to produce a new list (as a way of filtering items):