What Will Be The Output Of The Following Python Codep Pre #741
What will be the output of the following Python code?</p> <pre><code class="language-python">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</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Mapping Functions - Python Functional Programming Tools - Quiz No.1.
What will be the output of the following Python code?
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
[0, 2, 4, 6, 8, 10]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[1, 3, 5, 7, 9]
Error