create new 2d array in python code example
Example 1: python initialize a 2d array
x = [[foo for i in range(10)] for j in range(10)]
# x is now a 10x10 array of 'foo' (which can depend on i and j if you want)
Example 2: 2d array pytho
# 2D array that is 3x4 (3 columns, 4 rows)
# note that it is essentially an array of lists
arr = [
[11, 12, 5],
[15, 6, 10],
[10, 8, 12],
[12, 15, 8]
]