python lambda与zip 组合使用

code

# 提供了两个列表,对相同位置的列表数据进行相加
>>> map(lambda x, y: x + y, [1, 3, 5, 7, 9], [2, 4, 6, 8, 10])
[3, 7, 11, 15, 19]

 

 

 

 

 

 

 

posted @ 2020-05-12 14:38  anobscureretreat  阅读(398)  评论(0编辑  收藏  举报