Del function in ironpython dynamo

I’m trying to delete/ remove an item from a list using python scipt in dynamo. But when I use del function of python, I have an error : "Unexpected token 'del ’ " And then I try to use List.RemoveItemAtIndex but it doesn’t work as well. I’ve imported ‘DSCoreNodes’ but it doesn’t still work at all. So can you guys help me with this?Thanks guys

Please post your preformatted code so that one of the python gurus can edit rather than have to build from scratch. Thanks!

@hcmutkhanghaxuan have look here:

1 Like

import clr
from Autodesk.DesignScript.Geometry import *
from DSCore import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
#Assign your output to the OUT variable.
OUT = del a[1]

Here is my code, can you guys help me find errors in my code?

del a[1]

OUT = a

It works, thanks so much salvatoredragotta.


@hcmutkhanghaxuan :+1:

Mark as solved please