πŸ“Š Python
Q. What will be the output of the following code snippet?
Code:
a = [[], "abc", [0], 1, 0]
print(list(filter(bool, a)))
  • (A) ['abc', [0], 1]
  • (B) [1]
  • (C) [“abc”]
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) ['abc', [0], 1]

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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