How To Solve Matrix Problems In Python