Unable to clear all the list items from list

Hello Koders,
I was trying to clear the list items from the list something like this:

Here, I made a list in variable and tried to remove list items by index one by one.
But an error is coming like this:
Unable to remove the item from the length of list 2 (b d)

Am I doing some silliness ??

But why you want to clear the items one by one? Any particular reason/use case for doing the same?

I was actually implementing it to clear the list item and add other items in a particular condition. the first idea that came to my mind is by removing each item from the list. and then adding items in the list. @Vaibhav

I do forgot that i can easily do this by changing variable value to emptylist

Yes I meant the same :point_up: initially

Btw, check this :point_down: if you need anywhere

Thankyou @Vaibhav .

1 Like

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