Set .union() Operation

  • + 0 comments
    def stud_newspaper(a,b):
        return len(a.union(b))
    
    
    
    if __name__ == '__main__':
        n = int(input())
        eng = set(map(int, input().split()))
        b = int(input())
        fre = set(map(int, input().split()))
        print(stud_newspaper(eng, fre))