报错信息:
Traceback (most recent call last):
g = it.next()
AttributeError: 'callable_iterator' object has no attribute 'next'
解决办法:
将上述代码中调用next()的地方全部替换为__next__(),最后在控制台运行该代码,正确得到了预期的结果
报错信息:
Traceback (most recent call last):
AttributeError: 'callable_iterator' object has no attribute 'next'
解决办法:
将上述代码中调用next()的地方全部替换为__next__(),最后在控制台运行该代码,正确得到了预期的结果