- 4

How many kinds of arrays are there in python? 1D 2D .....

4th Jul 2021, 10:47 AM
nithin.k.s
nithin.k.s - avatar
2 Antworten
+ 3
nithin.k.s What about to do Google. You can find answer and also useful resources and you can get more information.
4th Jul 2021, 10:50 AM
A͢J
A͢J - avatar
+ 1
there is only one kind of list in python... however, multidimensional list are just nested list (list containing list), and there's quite no limit to how many dimensions you can handle, appart the human representation you can get for it ^^ 1d list (flat) => [ 1, 2, 3 ] 2d list (grid) => [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] 3d list (depth grid) => [ [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], [ [ 7, 8, 9 ], [ 10, 11, 12 ] ] ] 4d list could be seen as adding a time dimension... above 4d it will be more difficult to have human representation, but its ever possible to have list of n dimension => list of lists of n-1 dimension ;P
4th Jul 2021, 3:38 PM
visph
visph - avatar