python - Is there a way to create a grid? -
is there way create grid can access easy? example if grid is:
x y z 1 2 3 b c
and if run: print([1][1])
output 2
thanks!
the usual way use nested lists:
grid = [['x', 'y', 'z'], [1, 2, 3], ['a', 'b', 'c']]
Comments
Post a Comment