Matrix Diagonal Sum | Python Solution
\nclass Solution:\n    def diagonalSum(self, mat: List[List[int]]) -> int:\n        sumPD=0\n        sumSD=0\n        for i in range(len(mat)):\n            sum
```\nclass Solution:\n    def diagonalSum(self, mat: List[List[int]]) -> int:\n        sumPD=0\n        sumSD=0\n        for i in range(len(mat)):\n            sumPD+=mat[i][i]\n            sumSD+=mat[i][len(mat)-i-1]\n        sum=sumSD+sumPD\n        if len(mat)%2!=0:\n            sum-=mat[len(mat)//2][len(mat)//2]\n        return sum\n```
[]