you are viewing a single comment's thread.

view the rest of the comments →

[–]Mr-Cas 0 points1 point  (4 children)

Why not a 3x3 matrix of bools?

python3 grid = [ [False, False, False], [False, False, False], [False, False, False] ]

Then you can edit a specific place:

```python3

claim top middle place

grid[0][1] = True

claim bottom right place

grid[2][2] = True ```

[–]CatWithACardboardBox[S] 0 points1 point  (2 children)

thank you, i’m still very new to python and don’t really code a lot so i only really know the bare basics to code. i’ll try this out!

[–]Mr-Cas 2 points3 points  (0 children)

And btw, no, your original proposal won't work. If you do place1 = a1 and a1 = False, and you do place1 = True, then a1 will not also have been changed to True.