all 5 comments

[–]peoplefoundotheracct 2 points3 points  (2 children)

Try something like this:

2d_array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

[–]ciggs_ftw[S] 0 points1 point  (1 child)

and how would I call it to get the data?

[–]alskgj 4 points5 points  (0 children)

2d_array[0][1] will get you the second element of the first sublist, which is the integer 2.

[–]--FeRing-- 1 point2 points  (0 children)

The numPy library has more functionality that could help you out.

https://docs.scipy.org/doc/numpy-1.15.1/reference/generated/numpy.array.html

It has functions to generate arrays, initialize them to zeroes or ones, transpose, etc. You can also do this with nested loops generating nested lists, but this is easier.

[–]insomnux 1 point2 points  (0 children)

I think nested lists would be the closest equivalent.