Hey folks so I am making a tic tac toe game.
I was wondering, how I Iterate over each item in a list. I am using keys as values for the rows and then the index of the list is a column value.
gameboard = { 1: ["[ ]","[ ]", "[ ]"],
2: ["[ ]","[ ]", "[ ]"],
3: ["[ ]","[ ]", "[ ]"]
}
for key in gameboard:
print(gameboard[key])```
I'm confused. How would I iterate over each invididual list item?
I am aware also, that each item in the list is a string, how to I get the program to treat not iterate over each character - but the string itself?
Thanks in advance.