3 ms·
Python has something it calls lists. Those lists are basically like what other languages would call arrays. But python also has an array module you can use aft
by onli 8y ago
Python has something it calls lists. Those lists are basically like what other languages would call arrays.
But python also has an array module you can use after an import, it's not loaded by default. That data structure behaves even more like the thing C calls an array.
I don't see why a python list is not a list per se. Don't be confused by the others explaining it is not a linked list - something does not have to be a linked list to be a list. It's still a numbered collection of stuff that can be sorted, thus a list.
Though it is true that as a programmer you probably are first confronted with a data structure called list when you learn a LISP, and that data structure will be a linked list.
Confronting beginners with all this is not useful for them, w3schools just adding a note and calling the python default collection thing an array is thus not that unreasonable. Though I'd prefer it if they just called it a list in the explanation below the note, after explaining that this list structure is what you are probably searching, with a link "look there for what python calls an array". So in that way I agree with you, this is not optimal.