結果 : how to loop a matrix in python