首页 > 代码库 > 特殊表达式,

特殊表达式,

1 b = [1,2,3]
2 def a(i):
3     return i+2
4 c = [a(i) for i in b]
5 #右边表达式,不加[]是语法错误,即a(i) for i in b
6 print c

 

特殊表达式,