TILE_WIDTH = 2 # Includes space for padding and one space between tiles formatted_board = ""
for i in range(rows):
formatted_row = ""
for j in range(columns):
tile = board_string[i * columns + j]
formatted_row += f"{tile:<{TILE_WIDTH}}" # Left-justified formatting
formatted_board += formatted_row.rstrip() + "\n" # Remove trailing spaces and add newline
return formatted_board