0

Is lists and arrays are same in python

I think all lists can be arrays but arrays are not list

16th May 2020, 10:15 AM
Kavitha
3 Answers
+ 4
If you want to use "more array-like arrays" in Python, you can have a look at the numpy module that offers an array object type
16th May 2020, 10:35 AM
Lisa
Lisa - avatar
+ 4
For the sake of correctness, we have to admit that python does have an array module, that allows some basic array operations. It is not to compare with numpy, but it exists. I haven't seen many code samples where its used. More information can be get here: https://docs.python.org/3.7/library/array.html
16th May 2020, 12:17 PM
Lothar
Lothar - avatar
+ 3
Python (edit: standard) has no arrays. Python and commonly known arrays are different because a python list can hold elements of different Type Eg L=[1,2,"34",(1.2,7)]
16th May 2020, 10:21 AM
Oma Falk
Oma Falk - avatar