Hi!
Is it possible to find all the identical sublists and get only one?
For example if list[0], list[1] and list[2] are same then get list[0] and remove list[2] and list[3]
Here is a simple python code for the job.
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
# Place your code below this line
lists=IN[0]
newlists=[]
for list0 in lists:
cnt=0
for list1 in newlists:
if list0==list1:
cnt+=1
break;
if cnt==0:
newlists.append(list0)
# Assign your output to the OUT variable.
OUT = newlists
1 Like
Thanks so much !!!