Diff between 2


3. Write a python program to get the difference between the two list
          # Input
          # list1 = [1, 2, 3, 4]
         # list2 = [1, 2]

        #Solution:

list1 = [ 1, 2, 3, 4]
list2 = [1, 2]
print(list(set(list1) - set(list2)))





No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...