Write a program to find the difference between 2 lists


Topic: Write a program to find the difference between 2 lists

Solution

list1 = [10, 20, 30, 40, 50]
list2 = [10, 20, 30, 60, 70]
print "list1:", list1
print "list2:", list2
print "Difference elements:"
print (list (set(list1) - set (list2)))



List all Python Programs