What will be the output of the following Python code?
l=[1, 0, 2, 0, 'hello', '', []] list(filter(bool, l))
a) [1, 0, 2, ‘hello’, ”, []] b) Error c) [1, 2, ‘hello’] d) [1, 0, 2, 0, ‘hello’, ”, []]
Answer: c Explanation: The code shown above returns a new list containing only those elements of the list l which do not amount to zero. Hence the output is: [1, 2, ‘hello’].