multidimensional python list code example
Example 1: python add item multidimensional list
a_2d_list = [[1, 2], [3, 4]]
a_2d_list.append([5, 6])
Example 2: python initialize multidimensional list
[[0 for i in range(10)] for j in range(10)]
a_2d_list = [[1, 2], [3, 4]]
a_2d_list.append([5, 6])
[[0 for i in range(10)] for j in range(10)]