标签:style 表达 nbsp int ret fun 生成器 UNC 结果
def func(): return [lambda x:i*x for i in range(4)] print([j(2) for j in func()])
结果:[6,6,6,6]
def func(): return (lambda x:i*x for i in range(4)) print([j(2) for j in func()])
结果:[0,2,4,6]
标签:style 表达 nbsp int ret fun 生成器 UNC 结果
原文地址:https://www.cnblogs.com/gpd-Amos/p/8992401.html