标签:color python code for turn 生成器 logs blog pytho
a=[x for x in range(10)] print(a) #[0, 1, 2, 3, 4, 5, 6, 7, 8, 9
def pow(x): return x**2 b=[pow(x) for x in range(10)] #内嵌函数 print(b) #[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
标签:color python code for turn 生成器 logs blog pytho
原文地址:http://www.cnblogs.com/xiaoyaz/p/7620426.html