Python Python Array Length
The Length of an Array
Use the len()
method to return the length of
an array (the number of elements in an array).
ExampleGet your own Python Server
Return the number of elements in the cars
array:
x = len(cars)
Try it Yourself »
Note: The length of an array is always one more than the highest array index.