Lists are like arrays in C, but they are dynamically allocated.
They can grow to any size, without being fixed in advance.
A list is written in square brackets; entries are separated by commas.
Indexing starts from 0:
>>> x = ['a', 'b', 'c'] >>> print x[2] c
Because Python is dynamically typed, list elements do not all have to be of the same type.
>>> x = ['abc', 17.3] >>> y = [1, ['abc', 17.3], 2]