Set .difference() Operation

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