用numpy库(你得自己安装这个库,科学计算经常用得着)
矩阵运算大大简化
from numpy import *a = array([(1,2),(3,4)])b = array([(4,3),(2,1)])a + b