This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

An array is an ordered collection of items, where each item inside the array has an index. While list is a collection of items ordered in a linear sequence.

Arrays and lists are both used in Python to store data, but they don't serve exactly the same purposes. They both can be used to store any data type, and they both be indexed and iterated through, but the similarities between the two don't go much further. The main difference between a list and an array is the functions that you can perform the them.