I have two long lists and i need to find out what non duplicate items each list has.
set list1 to {1, 2, 3, 4, 5}
set list2 to {4, 5, 6, 7, 8}
Then it should return {4, 5}
I have two long lists and i need to find out what non duplicate items each list has.
set list1 to {1, 2, 3, 4, 5}
set list2 to {4, 5, 6, 7, 8}
Then it should return {4, 5}
Hi,
set list1 to {1, 2, 3, 4, 5}
set list2 to {4, 5, 6, 7, 8}
set resultList to {}
repeat with i in list1
if contents of i is in list2 then set end of resultList to contents of i
end repeat
actually 4,5 are duplicates
set list1 to {1, 2, 3, 4, 5}
set list2 to {4, 5, 6, 7, 8}
set resultList to {}
repeat with i in list1
if i is not in list2 then set end of resultList to contents of i
end repeat
set resultList2 to {}
repeat with i in list2
if i is not in list1 then set end of resultList2 to contents of i
end repeat
set theresults to resultList & resultList2
theresults