向量内积
from operator import mul
x = [4, 6, 9]
y = [2, 2, 7]
print(sum(map(mul, x, y)))
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/d0cd4b043de021e26f34e50d9ea77889.png)
相当于
x = [4, 6, 9]
y = [2, 2, 7]
print(sum((i*j for i, j in zip(x, y))))
两个等长的向量对应元素相加
from operator import add
x = [4, 6, 9]
y = [2, 2, 7]
print(list(map(add, x, y)))
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/2dc146cecd8abaabd005195fd7e81e49.png)