Compare two list views or dictionaries

i have two list view each one is got from dictionary , i want to compare the values of two listviews if the first listview has value equal to the value in list 2 the comparison result will be appeared in new list view .

example :slight_smile:

list view one output

name:physics code:T1
name:chemistry code:Y1

list view two output
name:physics code:T1
name:science code:B1
name:chemistry code:Y1

the listview 3 output (which i want to contain the result of comparisn)

name:science code:B1

how can i do that ??
the code of two listview attached

:

A simple example:

i want to delete the equals values in the new list >>> in your example i want the output of list c is to be ( fox,hen ) ---- (in list b instead of cow let it cat)


You need to change this two.

In set theory, this is called the Intersection of two sets.

In AI2, the lists are the Elements of the two List Views, call them A and B

Intersection (A,B) =
  List Filter (from list A)
     items satisfying 
       Is in list (B, item)


(draggable)