Home >>Python Programs >How to print the elements of an array in python
In this example, we will see a Python program using which we can print the elements of a given array. Elements of any array can be accessed through their corresponding indexes.
Example :
#Initialize array
arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
print("Elements of given array: ");
#Loop through the array by incrementing the value of i
for i in range(0, len(arr)):
print(arr[i]),