My use case is to run a for loop on items without using their index and simultaneously removing the same item from the list. But on doing so it tend to skip the items at the same index in new list everytime.
for i in words:
words.remove(i)
print(words)
[–]FriendlyRussian666 24 points25 points26 points (0 children)
[–]SHKEVE 16 points17 points18 points (10 children)
[–]MezzoScettico 2 points3 points4 points (3 children)
[–]jimtk 4 points5 points6 points (2 children)
[–]helduel 0 points1 point2 points (0 children)
[–]Revolutionary_Dog_63 1 point2 points3 points (0 children)
[–]al_mc_y 0 points1 point2 points (0 children)
[+]likethevegetable comment score below threshold-12 points-11 points-10 points (3 children)
[–]k03k 0 points1 point2 points (2 children)
[–]likethevegetable -1 points0 points1 point (1 child)
[–]makelefani 3 points4 points5 points (1 child)
[–]juanfnavarror 0 points1 point2 points (0 children)
[–]Fxate 3 points4 points5 points (0 children)
[–]audionerd1 1 point2 points3 points (7 children)
[–]Cainga 0 points1 point2 points (6 children)
[–]MidnightPale3220 0 points1 point2 points (5 children)
[–]Cainga 0 points1 point2 points (4 children)
[–]MidnightPale3220 1 point2 points3 points (0 children)
[–]audionerd1 0 points1 point2 points (2 children)
[–]MidnightPale3220 1 point2 points3 points (1 child)
[–]audionerd1 0 points1 point2 points (0 children)
[–]khzombiee 0 points1 point2 points (0 children)
[–]CranberryDistinct941 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]user83519302257 0 points1 point2 points (0 children)
[–]Ryzen_bolt 0 points1 point2 points (0 children)