Is it better to write it this way?

for i in xrange(1, n):
    for j in xrange(i, n):
        mat[i][j] = mat[j][i] = base**(i, j)