I am no expert in how Python lists are implemented but from what I understand, they are implemented as dynamic arrays rather than linked lists. My question is therefore, if python lists are implemented as arrays, why are they called 'lists' and not 'arrays'.
Is this just a semantic issue or is there some deeper technical reason behind this. Is the dynamic array implementation in Python close to a list implementation? Or is it because the dynamic array implementation makes its behaviour closer to a list's behaviour than an array? Or some other reason I do not understand?
To be clear, I am not asking specifically how or why Python lists are implemented as dynamic arrays, although that might be relevant to the answer.
arraywill usually imply all of the same type in many languages. It is not the case in Python.arraysin Python (as inarray.arrayfor instance) is a homogeneous container of a certain type.lists contain any object. Also - arrays because they're normally used for immutable types, can share "views" of sliced ranges such that no copying is made. See: docs.python.org/3/library/stdtypes.html#memoryview for instance or evennumpy.arrays