Python Loop Through an Array
Looping Array Elements
You can use the for in
loop to loop through all the elements of an array.
ExampleGet your own Python Server
Print each item in the cars
array:
for x in cars:
print(x)
Try it Yourself »