I want to initialize a multidimensional list. Basically, I want a 10x10 grid - a list of 10 lists each containing 10 items.
Each list value should be initialized to
An additional solution is to use NumPy library:
import numpy as np zero_array = np.zeros((10, 10), dtype='int')
This can be easily converted to a regular python list with the .tolist() method if necessary.
.tolist()