lambda expand in list

[(lambda x: x*x)(x) for x in range(10)]

Or better yet:
[x*x for x in range(10)]

 

posted @ 2014-03-19 19:47  samu  阅读(151)  评论(0编辑  收藏  举报