aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Galen Rice <[email protected]>2024-04-16 12:35:53 -0400
committerGravatar GitHub <[email protected]>2024-04-16 12:35:53 -0400
commit791b334c5e6cf36c44ec189d35e4a5f2472bcb47 (patch)
treea9457241d871d4dfc21a405d14480543a15a9363
parentfix: remove a line (diff)
fix: bold for list comp name, clean up some language
-rw-r--r--bot/resources/tags/loop-remove.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/resources/tags/loop-remove.md b/bot/resources/tags/loop-remove.md
index 624af8bcb..6acc843fd 100644
--- a/bot/resources/tags/loop-remove.md
+++ b/bot/resources/tags/loop-remove.md
@@ -19,7 +19,7 @@ print(data) # [2, 4] <-- every OTHER item was removed!
^ # and so on...
```
You can avoid this pitfall by:
-- using a list comprehension to produce a new list (as a way of filtering items):
+- using a **list comprehension** to produce a new list (as a way of filtering items):
```py
data = [x for x in data if x % 2 == 0]
```
@@ -28,4 +28,4 @@ You can avoid this pitfall by:
while data:
item = data.pop()
```
-- consider: you may not need to remove items in the first place!
+- considering whether you need to remove items in the first place!