What Will Be The Output Of The Following Python Codep Pre #1173
What will be the output of the following Python code?</p> <pre><code class="language-python">def f(x): for i in range(5): yield i g=f(8) print(list(g))</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Exception Handling - Python Exception Handling - Quiz No.3.
What will be the output of the following Python code?
def f(x): for i in range(5): yield i g=f(8) print(list(g))
[0, 1, 2, 3, 4]
[1, 2, 3, 4, 5, 6, 7, 8]
[1, 2, 3, 4, 5]
[0, 1, 2, 3, 4, 5, 6, 7]