Vidyalelo
Python · Q125

Functions in Python

Programming · Python · question 125

Q125

What will be the output of the following Python code? l=[n for n in range(5)] f=lambda x:bool(x%2) print(f(3), f(1)) for i in range(len(l)): if f(l[i]): del l[i] print(i)

A.
True True
1
2
Error
Answer
B.
False False
1
2
C.
True False
1
2
Error
D.
False True
1
2

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board