+ 2

Does python have multidimensional arrays?

I think it has them but here in the tutorial it says it doesn't. is it something related to the confusion about version of Python?

14th Nov 2017, 9:25 PM
Aditya Rana
6 Respuestas
+ 7
Wait... where is such a statement in the course?? Of course it has multidimensional arrays. Just import the numpy module ;) But even without it, Python's lists can be treated as array-like datatype -- they can be multidimensional, too. EDIT: It is written there, indeed[!] Perhaps needs a rephrasal...
14th Nov 2017, 9:53 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
Lists are a bit augmented vs arrays, as they can hold multiple data types. Comes for a price though, as you can't do linear algebraic (matrix) operations on them easily/quickly/at all.
15th Nov 2017, 7:52 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
Every programming language I know has multidimensional arrays!Python isn't an exception
14th Nov 2017, 10:34 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
[[2,3,4],[5,6,7],[8,9],[10]] exists! It's in Python called a 2-d list
14th Nov 2017, 10:12 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
The only exception is it is the only language with multidimensional array not called multidimensional arrays, but 2-d lists
14th Nov 2017, 11:03 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
It could be a misleading cuz python has multi dimensional arrays Here is one, arr = [1,2,[9[3,4],7],6] print(arr[2][1][1]) # outputs 4 The lists are primary arrays of python
15th Nov 2017, 9:28 AM
#RahulVerma
#RahulVerma - avatar