Why does this for-loop not go through all items:
temp = 0 for br in my_list : temp +=1 #other code here #my list is not used at all, only br is used inside here my_list.remove(br) print temp assert len(my_list) == 0 , "list should be empty"
So, assertion fires. Then I added the temp counter and I do see that despite my list having 202 elements, the for loop processes only 101 of them. Why is that?