📅  最后修改于: 2022-03-11 14:45:59.802000             🧑  作者: Mango
def diagonalDifference(arr):
# Write your code here
d1 = sum([arr[x][x] for x in range(len(arr))])
d2 = sum([arr[x][n - 1 - x] for x in range(len(arr))])
return(abs(d1 - d2))