Compare two Lists level 2 with String contains


I’m trying to compare two lists, the first one has 36 lists with the same 10 items in each list and the second one also has 36 lists but with only some of those 10 items, I would like to compare them, and return true/false to the list with 10 items each. But he’s returning me a list for each item on the second list. I’d like a list that’s only two before the second. Follow an example image and sorry for the bad ingels. Thank you very much!

String.Contains is meant for single comparing single items so comparing lists to lists won’t happen automatically. You need to account for each item being checked against a list. This means you’ll either have to combine or flatten your values to keep the list original structure.

Or you can just use Python.

dataEnteringNode = IN
out = []

for search,set in zip(IN[0],IN[1]):
	output = []
	for item in set:
		output.append(item in search)
OUT = out
1 Like

I use python, works!!! Thanks

1 Like