Intersection Get link Facebook X Pinterest Email Other Apps IntersectionQUESTION DESCRIPTIONWrite a program to find the intersection of two lists l1=[]l2=[]l3=[]an=int(input())bn=int(input())for i in range(0,an): v1=int(input()) l1.append(v1)for i in range(0,bn): v2=int(input()) l2.append(v2)l3=list(set(l1) & set(l2))print("The intersection is")print(l3) Comments
Comments
Post a Comment