結果 : how to get diagonal elements of a matrix in python without numpy