Python Access an Array

Access the Elements of an Array

You refer to an array element by referring to the index number.

Example

Get the value of the first array item:

x = cars[0]

Example

Modify the value of the first array item:

cars[0] = "Toyota"