2015-10-14 26 views

回答

0

不管用什么语言,你都可以使用地图。在蟒蛇它会是什么样子:

map(lambda x: x[0] + x[1], my_list) 

或者更简单:

map(sum, my_list) 

两个返回:

[5, 9, 5]