I am trying to write a rubix cube solver and I would like to call the same edge repeatedly to check information from it. However the position of the three dimensional area takes up a lot of space, I would like to put the positions that I use repeatedly into a variable so I can call the variable instead of rewriting the position over and over.
This is what my rubix cube looks like:
rubixCube = [
[["G","G","Y"], ["R","B","O"], ["R","R","O"]],
[["G","O","O"], ["O","Y","G"], ["R","B","B"]],
[["Y","W","Y"], ["R","O","O"], ["O","W","W"]],
[["B","B","W"], ["B","W","G"], ["G","W","R"]],
[["B","Y","R"], ["Y","R","W"], ["G","Y","B"]],
[["O","G","W"], ["B","G","R"], ["Y","Y","W"]]
]
and this is an example of a position I call repeatly:
if(rubixCube[0][0][1] == "W"):
can I write something approximately looking like this:
position = [0][0][1]
if(rubixCube[position] == "W"):