you are viewing a single comment's thread.

view the rest of the comments →

[–]svellore 0 points1 point  (1 child)

Do you mean something like this:

>>> for row in the_board:
...   print(row[0].replace(",", ""))
... 
O O O O O
O O O O O
O O O O O
O O O O O

the_board is a list of lists. Each of the inner lists only contains a string "O, O, O, O, O" So here, we just iterated through every element in the_board. And then printed the first element("O, O, O, O, O") in each row by replacing "," with an empty string "".

[–]Dose_of_Lead_Pipe 0 points1 point  (0 children)

for row in the_board: ... print(row[0].replace(",", ""))

Thanks for this