Combine Group with one of the duplicated value

Been cracking my head for 2 days for this. Hope someone could show me some direction.

I have 4 sets of numbers.

I wish to join sets that have duplicates in one of the values together, Since 4,5,8,9 appeared in the last 3 sets, i wish to combine them together. So the end result to be :

Do you really need two lists in the end?
Why is the first row wired in anyways.
It doesn’t have a duplicate number in it anyways, so why not leave it out?

Or will this do? If not it might put you on the right direction.

1 Like

try this one. may be there is a shortcuts… try from this one…

Test.dyn (13.3 KB)

1 Like

Welcome to the Dynamo community @acefairy25

groupListsWithDuplicates.dyn (17.1 KB)

1 Like

oh ty ty for all your reply. Let me try out first. Well, lets just say my question is a simplified version. Where in real application, there might be 1000s of groups. Hope to automate it to find their “own” group.

Thank you so much introducing “list.contains” node to me. It really sparks a light where i could continue work from there. Below is what i have achieved. But might need to repeat this for several times to double check the groups finally merged into final group.

1 Like