Set .intersection() Operation

  • + 0 comments
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    n = int(input())
    eng = set(map(int,input().split()))
    b = int(input())
    fren = set(map(int,input().split()))
    print (len(eng.intersection(fren)))