Extract list of ONLY non repeated items

revit
dynamo
python
#1

Hello everyone,

I have a list : {“A”,“B”,“D”,“E”,“B”,“D”} and I’d like to extract a list of ONLY non repeated items, in this case only A ad E. How can I achieve that within Dynamo or Python. I’ve tried with Python, importing collection counter but it did not work. please help. Thanks in advance!

#2

Hi @moughit.bouchaara

Here is one of the possible way…

#3

Thanks @Kulkul ! Great. I was wondering how we could do that with python (1 node), for instance with the counter collection. My script is already huge. Otherwise, I will use your solution, thanks again.

#4

Could you send your piece of code so that we can quickly see what this issue is about?

1 Like
#5

@moughit.bouchaara Like this:

3 Likes
#6

Brilliant @Kulkul! thanks a lot!

#8

@Yna_Db is right you should show us your code and errors. It helps others who is trying to help you.

1 Like
#9

I will, but in this case. appending the code will not help, I kept it simple. The question was straighforward. Thanks everyone!

#10

This is totally understandable. However, as I can see that you are newcomer, let me point out that the forum guidelines are mainly dedicated to maintain a good level of communication on this forum by exposing these simple savvy rules:

1 Like
#11

I totally agree . However, If I can keep it simple I will! It will be quick and efficient for everyone. Special thanks to @Kulkul !