python3(十一)generator
# 只要把一个列表生成式的[]改成()L = [x * x for x in range(10)]print(L) # [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]g = (x * x for x in range(10))print(g) # <generator object <genexpr> at 0x0000...