生成器表达式

g = (i for i in range(10))
print(g)
for i in g:
    print(i)
原文地址:https://www.cnblogs.com/fate2048/p/9783398.html