Q. What will be the output of the following code snippet?
Code:
a = [1, 2, 3, 4] b = [3, 4, 5, 6] c = [x for x in a if x not in b] print(c)
β
Correct Answer: (A)
[1, 2]
a = [1, 2, 3, 4] b = [3, 4, 5, 6] c = [x for x in a if x not in b] print(c)
You must be Logged in to update hint/solution