cancel
Showing results for 
Search instead for 
Did you mean: 

Python Array

Python Array

palaks
New Contributor
Hi this is Palak Sharma, I am in third year of my engineering and my interest is in Python Language. I have little bit confusion about Python list and array, can anyone define both term including what is the difference in between both of them.
Looking for your positive response in this regards.
Thanks
1 REPLY 1

anushkaa
New Contributor
Hi Palak.

You can understand difference in both of them by below mention points.

1. Python List is used to collect items that usually consist of elements of multiple data types while an Array is also a vital component that collects several items of same data type.

2. Python List cannot manage arithmetic operations while an Array can manage arithmetic operations on efficient way.

3. Python List contains elements that belong to the different data types while Python Array contains elements that belong to the same data type.

4. Python List occupies larger memory while Python Array occupies less memory.

5. In Python list, the complete list can be accessed without doing any specific looping, while in Array loop is mandatory to access the components of the array.

6. When it comes to easy way to work as well as flexibility, the list is perfect as it allows easy modification of data as compare to Python Array.

The main approach or aim of both Lists and Array is almost same, only difference is in working.
For better understanding you can also check below link, fruitful information available in detailed.
Click here to get the detail of Python List.
Clcik here to get the detail of Python Array.

Hope this answer will help you
Thanks

GTM-P2G8KFN