How to compare columns?

Hello everybody,

I have a list 1 with column A; B; C; D and list 2 with a; b; c. I would like to have a way to compare list 1 with list 2 and, when the value in b == value in B, my list 3 need to have the corresponding value C (e.g. list 3 will be a; b; C). Does anybody know if this is possible and how this can be done?
Thank you very much.


Python Code:

import clr
from Autodesk.DesignScript.Geometry import *

dataEnteringNode = IN

x = IN[0]
y = IN[1]
o =
for i in x:
l1 = i
for j in y:
l2 = j
if l1 == l2:

OUT = o

@marco1 Not sure if I’ve correctly interpreted your issue, but see if this works


@Mohammad_Nawar, @Vikram_Subbaiah

Thank you very much for your answers but I’m new to the dynamo software and I think I was’t able to be clear in what my problem exactly is. I hope with this text you will understand my problem better and will be able to help me.

I have 2 lists (List Alfa and list Beta)
In the picture I’ve included, list Alpha contains 3 items, a number and 2 lists with information. List Beta only contains a list with numbers. Now is my question, can I link the information from list Alpha to every number in List Beta with the same value, so all the numbers 1 in list Beta should contain the information AE, all the numbers 2 in list Beta shouldcontain the information BF etc.

Thanks in advance and I hope you can help me with this. Best regards, Marco1

There might be easier ways, but try this script

You should create a dictionary from list Alpha and feed it the lookupvalues from list Beta.

1 Like

@marco1 See if this works…
CompareColumns.dyn (8.3 KB)