Custom Print: Not printing?


I think the code is not printing properly. I only receive "None" when the function is called

To print, row by row, the board

board = []
for i in range(0, 5):
    board.append(["O"] * 5)

def print_board(board):
    for row in board:
        print row


Python is whitespace sensitive.

Right there, you have an indent which is causing it to not work. Just get rid of that and it will work fine.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.