+ 1
python heelp
how easy add two lists. I have: tab1=[1,2,3,5,6] and tab2=[3,4,5,7,2] and tab 3 = [(tab1[0]+tab2[0]),(tab1[1]+tab2[1])....... ]
2 Réponses
+ 3
Found this somewhere:
tab3 = list(map(lambda n1, n2: n1+n2, tab1, tab2))
print(tab3)
Link: https://www.programiz.com/JUMP_LINK__&&__python__&&__JUMP_LINK-programming/methods/built-in/map
+ 1
thank you so much. Works fine