In python, you can do this:
[([None] * 9) for x in range(9)]
and you\'ll get this:
[[None, None, None, None, None, None, No
There is something about Array.fill I need to mention.
If you just use below method to create a 3x3 matrix.
Array(3).fill(Array(3).fill(0));
You will find that the values in the matrix is a reference.
If you want to pass by value rather than reference, you can leverage Array.map to create it.
Array(3).fill(null).map(() => Array(3).fill(0));