Answer :
Answer:
d = {1:2, 3:4, 5:6, 7:8}
list = [1, 7]
not_found = set()
for x in list:
if x not in d.keys():
not_found.add(x)
else:
del d[x]
print(d)
print(not_found)
Answer:
d = {1:2, 3:4, 5:6, 7:8}
list = [1, 7]
not_found = set()
for x in list:
if x not in d.keys():
not_found.add(x)
else:
del d[x]
print(d)
print(not_found)