The problem is that [...]
in python has two distinct meanings
expr [ index ]
means accessing an element of a list[ expr1, expr2, expr3 ]
means building a list of three elements from three expressionsIn your code you forgot the comma between the expressions for the items in the outer list:
[ [a, b, c] [d, e, f] [g, h, i] ]
therefore Python interpreted the start of second element as an index to be applied to the first and this is what the error message is saying.
The correct syntax for what you're looking for is
[ [a, b, c], [d, e, f], [g, h, i] ]