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]
Try it Yourself »

Example

Modify the value of the first array item:

cars[0] = "Toyota"
Try it Yourself »


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.