5
9
85
5K
19
Download Image
@PythonPr Answer: c {'c', 'b'} The tricky part: {k for k in d.keys()} creates a SET (no colon = set comprehension), not a dict. Sets have unique values only (like dict without values, only keys). Then & finds intersection (values in BOTH sets): {'a','b','c'} & {'b','c','d'} = {'b','c'}.
@PythonPr The output of print(func(dict1)) is {'c', 'b'} (or {'b', 'c'} since order in a set doesn't matter). Answer option is: c. {'c', 'b'} For More Reference =>>