Battleship board creation


Hi experts

Line 3 and 4, which I have commented out, works. But when I put it in a function it returns an error saying that I don't have 5 rows in my list.

Could it just be because of the way the result is checked by the webpage?

board = []

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

def initialize_board (board):
    for i in range (5):
    return board


You might get in trouble in later exercise, who knows. Anyway, if you create a function, you should also call it, because otherwise the function doesn't get executed, which means the board doesn't get created