Skip to content

Instantly share code, notes, and snippets.

@h2rd
Created December 5, 2013 12:22
Show Gist options
  • Select an option

  • Save h2rd/7804373 to your computer and use it in GitHub Desktop.

Select an option

Save h2rd/7804373 to your computer and use it in GitHub Desktop.
a = [1,2,6,3]
b = [4,2,1,5,3]
list(set(a).symmetric_difference(set(b)))
# 4, 5, 6
# (a - b) + (b - a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment