Easy Way to get the Set Difference between datasets?

If you put the ids from each dataset into a list, you could use set intersection() functions found here
So still a couple loops, but get the intersection pretty simply.
Though I do wonder why you don’t perform this at the database level with different joins?

Edit for Clarity:
I think the arguments intersection expects are called sets, you can find an example from the forum here