I’m not sure if this is FCC wanting a very specific syntax to pass or if I am completely missing the mark…
You should use .join() to join the items in row_str with a space and add the result to the current value of board_str .
Your code so far
class Board:
def __init__(self, board):
self.board = board
# User Editable Region
def __str__(self):
board_str = ''
for row in self.board:
row_str = " ".join([str(i) if i else '*' for i in row])
self.board_str += row_str
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Challenge Information:
Learn Classes and Objects by Building a Sudoku Solver - Step 75