adplus-dvertising
frame-decoration

Question

The output of the code shown below is:
odd=lambda x: bool(x%2)
numbers=[n for n in range(10)]
print(numbers)
n=list()
for i in numbers:
    if odd(i):
        continue
    else:
        break

a.

[0, 2, 4, 6, 8, 10]

b.

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

c.

[1, 3, 5, 7, 9]

d.

Error

Posted under Python

Answer: (b).[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. The output of the code shown below is: