replace characters in list of lists
<p>I started a suduko project and I need to replace all the 0 in the list "board" to " ".
why it doesnt work?</p>

<p>I get this error:</p>

<pre><code>AttributeError: 'list' object has no attribute 'replace'
</code></pre>

<p>my code:</p>

<pre><code>board = [[3,7,0,0,5,0,0,0,0],
         [0,6,0,0,3,0,2,0,0],
         [0,2,9,4,0,0,0,7,8],
         [0,0,4,1,7,0,0,8,0],
         [0,0,6,3,0,5,9,0,0],
         [0,5,0,0,8,4,1,0,0],
         [7,1,0,0,0,8,5,6,0],
         [0,0,5,0,1,0,0,2,0],
         [0,0,0,0,9,0,0,1,3]]

def print_board(board):
    pass
    a=-1
    board=board.replace(0, " ")
    for i in board:
        a+=1

        if a%3==0:

            print 25*"*"+""
            print "*",i[0],i[1],i[2],"*",i[3],i[4],i[5],"*",i[6],i[7],i[8],"*"

        else:
            print "*",i[0],i[1],i[2],"*",i[3],i[4],i[5],"*",i[6],i[7],i[8],"*"
    print 25*"*"+""
</code></pre>
