Skip to content

Commit ae2a703

Browse files
author
Galen Rice
authored
fix: slightly condensed language
1 parent 585f98e commit ae2a703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/resources/tags/loop-remove.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ for item in data:
99
data.remove(item)
1010
print(data) # [2, 4] <-- every OTHER item was removed!
1111
```
12-
While iterating with a for loop, an index tracks the current position in the list. If the list is modified, this index may no longer refer to the same element, causing elements to be repeated or skipped.
12+
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.
1313
```py
1414
[1, 2, 3, 4] # First iteration: point to the first element
1515
^

0 commit comments

Comments
 (0)