之後一個遍歷,簡單方法就這樣寫了。html
map(lambda x: x ** 2, [1, 2, 3, 4, 5])spa
[1, 4, 9, 16, 25]htm
map(lambda x, y: x + y, [1, 3, 5, 7, 9], [2, 4, 6, 8, 10])blog
[3, 7, 11, 15, 19]lambda
http://blog.sina.com.cn/s/blog_45ac0d0a010191rb.html遍歷