This code is my attempt at creating an empty 3d array.
n=3
board = [[[ 0 for _ in range(n)]
for _ in range(n)]
for _ in range(n)]
print(board)
So, what that creates is exactly what I'm looking for a 3d array with dimensions n by n by n, but the list is filled with 0's and if I take out the 0 an error occurs. How would I create this same list but empty?
[[ [] for _ in range(n)] for _ in range(n)]nlooks like?