What is a list?

Ordered set of values, values are the so-called elements of a list

An element can be 'anything', e.g.

  • a string

  • a floating-point

  • another list

  • etc.

Each element is identified by an index

Compare lists and strings:

  • both consist of elements

  • both refer to an element using an index

  • both use bracket operator ([]) for refering to elements

  • but: string elements are single letters; list elements can be anything