What is the difference between Python array and Python list?
Last updated 2 years, 11 months ago | 1139 views 75 5

Difference between Python array and Python list
Array | Lists |
it is used to store only homogeneous data. | The list is used to store heterogeneous data |
it occupies less amount of memory as the array stores only similar types of data. | List stores different types of data so it requires a large amount of memory compared to the array |
The length of an array is fixed as need to declare the length at the time of declaration. | The length of the list is not fixed |