How can I remove sublist value by index

Hello, I want to change the value of the sublist item to an empty list based on the index.
I just only want to change {0,0}, {1,1}, {2,2} surface to empty list
Is it possible like to be picture??
11
22

Hello @whup
Hope this will solve your problem


list.dyn (6.3 KB)

THANK YOU FOR YOUR REPLY
The result is not returned, it returned NULL.

oh sorry i forgot to run
it worked!

I’m really sorry but how can I express the index of a sublist like {0,0}, {1,1}, {2,2}…

No need to create Sub index,
for example you need to delete {0,0},{1,0}{2,0}
then directly create the list of [0,1,2]

It seems to have been misdirected. i want to delete {0,0}, {1,1},{2,2},{3,3}…

So in this case, Number of item in main list and number of item in each sublist remain same ?

Yep that’s right

Yep

list.dyn (6.9 KB)
Try with this one

The resulting surface works correctly! However, the index number is very important to me. Is it difficult to output each value as an empty list?

Hello @whup

I dont understand the actual problem.

Along with this, you want to provide index also, So script will provide empty list on that particular index?


list.dyn (8.3 KB)

python script is your latest files
am i doing somthing wrong??77

@whup See if this points you in the right direction.

1 Like

list.dyn (10.5 KB)

This is the script attached in the message.

@AmolShah ,
How you have increase the length of Watch node?

1 Like

@honeyjain619 It’s because I’m using Core 2.11.x via Sandbox

1 Like

that’s exactly what i want!
but there is one problem
it’s a {11,0} surface of original list

But the surface in the changed list of {11,0} is this.

Does this happen inevitably?

I am so sorry. It seems that my dynamo skills are inexperienced, so I keep having problems. I just opened your last file, but I get a null value.

oh for god sake i forgot to click run again
i/m really sorry it worked~!
You must have been frustrated because of my lack of skills. I’m really sorry and thank you.