You are viewing a single comment's thread. Return to all comments →
n_E = int(input()) L_E = set(map(int, input().split())) n_F = int(input()) L_F = set(map(int, input().split()))
print(len(L_E.difference(L_F)))
Seems like cookies are disabled on this browser, please enable them to open this website
Set .difference() Operation
You are viewing a single comment's thread. Return to all comments →
Enter your code here. Read input from STDIN. Print output to STDOUT
n_E = int(input())
L_E = list(map(int, input().split()))
n_F = int(input())
L_F = list(map(int, input().split()))
count = 0
R=[]
for x in L_E:
if not x in L_F:
count+=1
R.append(x)
else:
continue
print(count)
n_E = int(input()) L_E = set(map(int, input().split())) n_F = int(input()) L_F = set(map(int, input().split()))
print(len(L_E.difference(L_F)))