Printing Pretty


#1


https://www.codecademy.com/courses/python-beginner-en-4XuFm/0/6?curriculum_id=4f89dab3d788890003000096#

Why do I need to print the print_board function?
Shouldnt it print the board when i call the function since the print command is already in the function?


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

def print_board(board):
    for item in board:
            print " ".join(item)
            
print print_board(board)


#2

no you have to call the function then only it can print the desired output.


#3

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