Python Easy To Understand Solution
\nclass Solution:\n    def diagonalSum(self, mat: List[List[int]]) -> int:\n        total = 0 \n        for i, x in enumerate(mat):\n            if i == len(mat
```\nclass Solution:\n    def diagonalSum(self, mat: List[List[int]]) -> int:\n        total = 0 \n        for i, x in enumerate(mat):\n            if i == len(mat)-i-1:\n                total += x[i]\n            else: \n                total += x[i] + x[len(mat)-i-1]\n        return total\n```\nEnumerate() method adds a counter to an iterable and returns it in a form of enumerating object. This enumerated object can then be used directly for loops or converted into a list of tuples using the list() method.
['Array', 'Matrix', 'Python', 'Python3']