题目:下列代码的输出结果是( )丨def fun(): print(0)
def fun():
print(0)
i=0
while i < 3:
i+=1
yield i
x=fun()
y=(i for i in x)
print(list(y))
A、[0,1,2,3]
B、0 [1,2,3]
C、0 1 2 3
D、[1,2,3]
参考答案:B
def fun():
print(0)
i=0
while i < 3:
i+=1
yield i
x=fun()
y=(i for i in x)
print(list(y))
A、[0,1,2,3]
B、0 [1,2,3]
C、0 1 2 3
D、[1,2,3]
参考答案:B
版权声明
声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益
请联系本站我们将配合处理!