Python chess DS needs help

Hi,

My Python chess data structure code makes an 8x8 array,
but my print method can't access the Board global data structure, and it must be something simple that I can't see. . .
What have I one wrong?
What is wrong in the print method start-up at the bottom?

Thanks

__author__ = 'jameshancock'

class DeepRedChess :



    def __init__(self):

        Board = [[0 for x in range(8)] for x in range(8)]

        # [0 to 7][0 to 7] makes 64 square board[0 to 7 numbers][a-h, 0 to 7]

        # white pieces are lower case, knights are n, cause k is king
        Board[0][0]='r'
        Board[0][1]='n'
        Board[0][2]='b'
        Board[0][3]='q'
        Board[0][4]='k'
        Board[0][5]='b'
        Board[0][6]='n'
        Board[0][7]='r'
        # black pieces are upper case
        Board[7][0]='R'
        Board[7][1]='N'
        Board[7][2]='B'
        Board[7][3]='Q'
        Board[7][4]='K'
        Board[7][5]='B'
        Board[7][6]='N'
        Board[7][7]='R'

    def printBoard(self):

        for x in range(0,7):
            print Board[0][x]


drc = DeepRedChess();
drc.printBoard();

Open in new window

LVL 1
beavoidAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Walter RitzelSenior Software EngineerCommented:
you need 2 for statements to print the full board:
       # board coordinates are always row,col so x will be row and y will be col
        for x in range(0,7):
              for y in range(0,7):
                      print Board[x][y], #the comma at the end is to not jump to the next line
              print " " # this print is to jump to the next line

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
beavoidAuthor Commented:
Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.