Python Access an Array
Access the Elements of an Array
You refer to an array element by referring to the index number.
ExampleGet your own Python Server
Get the value of the first array item:
x = cars[0]
Try it Yourself »
You refer to an array element by referring to the index number.
Get the value of the first array item:
x = cars[0]
Try it Yourself »
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com