-1

For example:

List1 = [1,2,3,4,5,6,7]

List2 = [3,4,5,6,7,8,9]

and I would like it to return [8,9] because 3,4,5,6 and 7 are in both lists.

Any ideas? Thanks in advance.

Gavin Wong
  • 1,254
  • 1
  • 6
  • 15

1 Answers1

0
return list(set(List1) - set(List2))
Gavin Wong
  • 1,254
  • 1
  • 6
  • 15