How to Loop Through All Elements of Array in Python


In this example, we will learn how to loop through all the elements of an array in Python.

Source Code

letter = ['a', 'b', 'c', 'd']
for item in letter:
    print(item)

Output:

a
b
c
d
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments