for v in IN[0]:
this means loop through every item in the list which you connected to IN[0].
“v” is something you choose yourself, so that can also be “listitem” or so. So the loop picks [1,2] then 2, then [3,3] then 4 and finally 5
. . . if v not in IN[1]:
. . . while you are in that loop, you are checking if ‘v’ is not in the list on IN[1]
. . . if so (thus v is not in IN[1]): add v the OUT list.