Nov-27-2022, 01:47 PM
(This post was last modified: Nov-27-2022, 01:56 PM by deanhystad.)
Ask yourself if you need to remove items from a list. I never do this. I build a new list that only contains the items I want to keep.
If you think you need to remove all items, for is the wrong choice for your loop.
If you think you need to remove all items, for is the wrong choice for your loop.
while list_of_users: user = list_of_users.pop(0) # whatever