Custom print


so this code works but i dont understand one line


board = []

for i in range(0,5):

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


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


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


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