I would like to write a function that calculates scalar sum of several vectors. It should take several lists as arguments eg.
def add_lists(x, y, z):
# return sum of x, y, z
x = add_lists([1, 2],[2, 1],[3, 1])
# x returns [6, 4]
It is easy to do it for only two arguments, but how can I do it using *args if they are more than two, so that my add_lists
will return [6, 4]?