Find the difference of two lists in python

Sterling Cobb
Jan 26, 2021

If you’re looking for a simple way to match two list in python and determine which items are not in both sets, I found the following works well.

This does the following:

  1. Convert the list to a set
  2. Calculate
  3. Convert back to a list

--

--