You code has multiple problems. The { outside the format string is a syntax error. You need a pair {} in the format string. You should use conversion type d for an int. Sep only applies if there is more than one field. End determines what is printed after each print statement. I expect the following is what you want.
for i in range(7):
print("{0:>2d}".format(i), end=" ")
# prints
0 1 2 3 4 5 6
EDIT: Avoiding a final space is only slightly harder.
start = True
for i in range(7):
print('' if start else ' ', "{0:>2d}".format(i), sep='', end='')
start = False
# prints
0 1 2 3 4 5 6