<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<font face="Franklin Gothic Medium"><br id="ecxFontBreak">Me again, I've been sat here for about an hour now staring at this code:<BR> <BR># Sudoku<br># Sudoku is a logic-based number-placement puzzle<br># The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 sub-grids that compose the grid contains all of the digits from 1 to 9<BR>import random<BR>def new_board():<br>    """Creates the game board. """<br>    board=[]<br>    for i in range(9):<br>        column=[]<br>        for j in range(9):<br>            column.append(i)<br>        board.append(column)<br>    return board<BR>def display_board(board):<br>    """Displays the game board on screen. """<br>    for i in range(9):<br>        for j in range(9):<br>            rand_num=random.randint(1,9)<br>            if rand_num not in board[i]:<br>                board[i][j]=rand_num<br>            else:<br>                board[i][j]=' '<br>            print(board[i][j],"|",end='')<br>        print()<BR># assign the new board to a variable and display it on the screen<br>game_board=new_board()<br>display_board(game_board)<BR><br>I'm cant figure out how to make it so that each column only has (at most) 1 of each number. I've managed to do it fine for the rows but I'm not sure of how I can do it for the columns. I dont want it to seem like I'm being lazy and just getting you guys to do all the work for me so I'm not necceserily asking for a solution, just advice really. </font><BR>                                         </div></body>
</html>