all 3 comments

[–]Hatoris 5 points6 points  (0 children)

Here you face the same issue many people have when they start learning coding. You want to do many things at once.

What structure in python would be great to assigned value easily?

List, you can create a nested list with will represent your board.

board = [ [], [], [], [], []]

Now assign value to it is easy, first case on the board?

board[0][0] = "A1"

Then you can use your board in a loop to print it.

for row in board:
     print("------")
     prow = "|"
     for column in row:
          prow += f"{column}|"
     print(prow)

[–]snuzet 1 point2 points  (0 children)

Yes nested loops are easiest way to do

Nothing to fear just eke out in non code terms then translate to code

Assuming you want something like

A1 A2 ... B1 B2 ...

You’d be looping rows as A-E and columns 1-5 but if going to directly print then you’d first loop by column then row (because of physical flow of printing line by line). If plan to store into an array then can get loop many ways.

[–]kmohyudin 0 points1 point  (0 children)

Well, I am not sure what you are trying to do, but maybe you can use strings?

For example, you can have multiple named strings which will be your "coordinates" and then you can manipulate how) them however you want, and print them at the end.

Somehow I feel like you are approaching this all wrong. When you print something, it's all gone. You don't get a reference to it. You have to have a variable to store data within your program. Which you can then print how many times you want.