Ad
  • Default User Avatar

    Using remove on lists while iterating through them with a for loop can cause parts of the list to be skipped, which is what's happening in your code.