From my understanding of your question, you're essentially looking for a grid like you would find for multiplication tables except with 'X' instead of products.
Below is an adaptation of this answer to the question How to print a 10*10 times table as a grid?.
# Set Number of Rows and Columns
cols = 21
rows = 11
# Determine width of each column based on largest column
space_fmt = f'{{:>{len(str(cols)) + 1}}}'
# Print Header Row
print(''.join(space_fmt.format(i) for i in range(0, cols)))
# Print Remaining Rows
for y in range(1, rows):
# Print First Number
print(space_fmt.format(y), end='')
# Print Xes
print(''.join([space_fmt.format('X') for _ in range(1, cols)]))
An answer with just for loops, no join on list comprehensions
# Set Number of Rows and Columns
cols = 21
rows = 11
# Determine width of each column based on largest column
space_fmt = f'{{:>{len(str(cols)) + 1}}}'
# Print Header Row
for i in range(0, cols):
print(space_fmt.format(i), end='')
print() # New Line
# Print Remaining Rows
for y in range(1, rows):
# Print First Number
print(space_fmt.format(y), end='')
# Print Xes
for col in range(1, cols):
print(space_fmt.format('X'), end='')
print() # New Line