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:
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
Here is my code, can you guys help me find errors in my code?
a=[1,1,1,2,3] del a OUT = a
It works, thanks so much salvatoredragotta.
Mark as solved please