Python Add Elements of a List (or Set, or whatever Data Type is appropriate)
Question
Is there an easy way to add the members of two equally sized list
s (or tuple
or whatever data type would work best)?
I have, for example a
and b
with 2 elements:
a = (0, 10)
b = (0, -10)
I want to add them and get as result:
result = (0, 0)
NOT (0, 10, 0, -10)
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow