I want to build a table like the following with Python.
0 1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
The code is like this
i = 0
j = 0
total = 6
while j <= total:
while i <= total:
print(i, "\t", end="")
i += 1
print("")
j += 1
I got an error "unindent does not match any outer indentation level", which says "j += 1" was wrong. I use Sublime Text 3 as my IDE. Please tell me what went wrong and how to fix it?