Set .intersection() Operation

  • + 0 comments
    n = int(input())
    A = set(input().split())
    b = int(input())
    B = set(input().split())
    print(len(A&B))