iter//创建一个可以迭代的对象

obj=iter([11,22,33,44])

print(obj)

r1 = next(obj)

print(r1)

r2 = next(obj)

print(r2)

没了就会报错的

yield==>

发表回复