List x array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

List x array

Is the list in python, the same than arrays or vectors in java?

13th Nov 2016, 7:50 PM
Pedro Santos
Pedro Santos - avatar
5 Answers
+ 1
The list is implemented as a dynamic and heterogeneous array.
13th Nov 2016, 8:00 PM
Amaras A
Amaras A - avatar
0
okay, thanks... cuz for me, it seems pretty much similar with vectors in Java
13th Nov 2016, 10:19 PM
Pedro Santos
Pedro Santos - avatar
0
welcome. I don't know about vectors (yet) though.
13th Nov 2016, 10:21 PM
Amaras A
Amaras A - avatar
0
the thing with vectors is... you can store different type of data into the vector... even objects
13th Nov 2016, 10:52 PM
Pedro Santos
Pedro Santos - avatar
0
Well, that won't help you : you always store objects in Python's lists (everything is an object, literally). So integer, string, lists, sets, functions... You can store all theses sorts of things in a list.
13th Nov 2016, 11:43 PM
Amaras A
Amaras A - avatar