List items are not deleted correctly

i want to delete item from list using loop

number variable is increase corectly but item are not correctly removed.
**numbre are at index **
**7 ,8, 9, 10, 11, 12 **
but deleted items are at index
7, 13,9,15,11, 17 which means 3 item from the first range and 3 item from the secound range. why ? anyone who help me please

assume my partition length(startinglength) will be 6 and i click on image+text list view postion 2 then the index value will be 3
so the expected list item to be deleted are item at index 13 14 15 16 17 18. but it is not delete those item ratherit only delete 13 15 17 from this and 3 more from the next 6 band.

To delete several items from a list you have to start deleting from the end of the list in direction to the beginning


1 Like

hi taifun i am happy to see you again!!... Ok i got your point ....please can you show me 1 example about this,.... how to do this?....

and you mean that, if i have list variable with 40 item and if i want to delete items from 25 to 31. i should have to go from 31 to 25?

Yes, you got it

the list will shrimk with each deletion... if you first delete the item at index 25, the item formerly at index 26 is now at Index 25
Now deleting the item at Index 26 will delete the item at index 27 of the previous list


Alternatively delete 6 times the item at Index 25...
Tip: don't do that... :sweat_smile:

ok let me try! ...wait ...

:grinning_face_with_smiling_eyes: :grinning_face_with_smiling_eyes:....Ok

hi taifun could you help me with this topic please

well we did it.....Taifun! and we all proud to have you!......thanks a lot...

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.