This is my code
def draw_cell_board(): '''draws 3x3 rows,columns; inserts numbers 1-9 in the cells''' draw_cell_at_different_range = [(range(1,4)), (range(4,7)), (range(7,10))] number_of_rows_in_a_cell = 3 while_loop_counter = 0 while while_loop_counter < number_of_rows_in_a_cell: print(f'-'*13) print('| ', end='') for raw_num in draw_cell_at_different_range[while_loop_counter]: print(f'{raw_num} | ', end='') print('') while_loop_counter += 1 # prepare next range print(f'-'*13)draw_cell_board()
The output is okay. It displays what I want:
-------------| 1 | 2 | 3 | -------------| 4 | 5 | 6 | -------------| 7 | 8 | 9 | -------------
However, I would like to use built-in functions to make my code more pythonic, that is, more professional.