Custom Print


#1

Could you please explain why my code is working?

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

def print_board(board):
    for i in range(len(board),4):
        print board[i]
print_board(board)

And if I click "Save and Submit" the black board on the right just Shows "None" instead of showing me my board.


#2

This is a little off.

It should be a range from 0 to len(board).


#3

Check this thread out, https://discuss.codecademy.com/t/5-custom-print/35662/8

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

The above code worked for me. Printing (board) will print the entire board.