πŸ“Š Python
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)
  • (A) [1, 2]
  • (B) [5, 6]
  • (C) [1, 2, 5, 6]
  • (D) [3, 4]
πŸ’¬ Discuss
βœ… Correct Answer: (A) [1, 2]

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
341
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Akash Lawaniya
Publisher
πŸ“ˆ
99%
Success Rate