Just a seggestion š ... or two if board is going to be a list of numeric strings in order you can also just use range to create your board squars without the list object. that way you dont create two sparate lists each time (board and range). and fstring to help control spacing more. while we are t it lets throw in a new line variable š
For Example: for square in range(1, 10): # 1-9 nl = '\n' if square%3 == 0 else '' print(f'| {square} |{nl}', end='')prints:
| 1 || 2 || 3 | | 4 || 5 || 6 | | 7 || 8 || 9 |As for myself, I like to use Unicode in my console apps
I'll show an example of how I would implement a Board š
prints:
āāā¦āā¦āā¦āā¦āā¦āā ā 1 ā¬ 2 ā¬ 3 ā£ ā āā¬āā¬āā¬āā¬āā¬āā£ ā 4 ā¬ 5 ā¬ 6 ā£ ā āā¬āā¬āā¬āā¬āā¬āā£ ā 7 ā¬ 8 ā¬ 9 ā£ āāā©āā©āā©āā©āā©āāmany ways to do it. just figured id share š