Hi folks,
I’m struggling with the list now. I’m wondering if I can get the index of Empty List from a list.
Kindly take a look at the picture
Anyone has solutions ? thanks
Use List.IsEmpty with Longest lacing or list levels.
You can make a python script,
b=IN[0]
L=[]
for i in b:
if b[i]==True:
L=L+[i]
OUT = L
I don’t know how to implement on this site sorry
In true python it will work… With dynamo I don’t know…
You could also use List.FilterByBoolMask, using List.isEmpty as Mask
@truongbaolam0209 attach a List.AllIndicesOf node to List.IsEmpty with the boolean true as the item input
it is not working, could you pls elaborate more ? thanks
Assuming you want the indices so that you can then get elements at those same indices, you can just use FilterByBoolMask to filter your elements based on the true/false values you get.
Mark the reply that helped you solve the issue as the Solution.
You could just use OOTB List.Clean. it takes care of any list structure
Go to the post with the answer of your topic and you will find this element
Make sure you mark the solution for the question you posted about, not any subsequent questions. The whole point of marking a solution is so that other people with the same question can quickly find an answer in your post.