Custom print


#1

so this code works but i dont understand one line

```python

board = []

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

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

print_board(board)

the last line print_board(board) what is it doing? calling the function?


#2

yep, spot on :slight_smile: Its indeed calling the function. Functions don’t execute unless called, we want to print the boad, so we need to call the function


#3

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