Is list and array same thing or is there a difference?
In C++, list and array are the same thing. An array can contain only single type of data elements (homogenous data types) i.e. an array can either contain only int, float, characters or strings.
However, In Python, list and arrays are two different data structures. Array is same as that in C++.
However, a list can contain different types of data elements (collection of hetrogenous data type elements), i.e. a list can consists int, float, strings etc. Ina single data type i.e. list.
Comments
Leave a comment