Printing Pretty - Stumped?


#1

This is my first post, hope I format everything acceptably, my apologies if I screw something up lol.

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

I can't figure out why this code won't work for me, help is appreciated!

board = []
for row in range(5):
    board.append(["O"] * 5)
def print_board(board):
    for row in board:
        print "  ".join(row)

print_board(board)

This returns:

O  O  O  O  O
O  O  O  O  O
O  O  O  O  O
O  O  O  O  O
O  O  O  O  O
None

And gives me an error message: "Oops, try again. It looks like you function didn't print out the correct response!"


#2

Hi @kypmoore,

You have two spaces between the quotes, here, where you should have only one space ...

        print "  ".join(row)

#3

Wow boy do I feel silly. Thanks so much!


#4