What is the output of the following Python code?
def g():
for i in range(3):
yield i * i
print(sum(g()), list(g())[-1])- A5 2
- B3 4
- C5 4
- D14 4
Correct answer: C
What is the output of the following Python code?
def g():
for i in range(3):
yield i * i
print(sum(g()), list(g())[-1])