fir3net
PPS-Firenetbanner-780.5x190-30-03-17

Python - Show differences between 2 Lists

Below shows you how to compare and show the differences between 2 lists by using the set command,

>>> set([1563, 1564, 1565, 1566, 1567]).symmetric_difference([1563, 1564, 1565, 1566, 157])
set([1567, 157])

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001