Python code to solve sudoku puzzles