python基础 列表推导式

a=[1,2,3,4,5,6,7,8]

b=[i**2 for i in a if i >= 5]

print b

原文地址:https://www.cnblogs.com/angdh/p/11729025.html