Vidyalelo
Python · Q38

Exception Handling in Python

Programming · Python · question 38

Q38

What will be the output of the following Python code? def f(x): yield x+1 print("test") yield x+2 g=f(10) print(next(g)) print(next(g))

A.
No output
B.
11
12
Answer
C.
11
test
D.
11

Answer: Option B

Solution

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