How to Loop Through Tuple Items in Python


In this example, we will learn how to loop through the tuple items in Python.

Source Code

my_tuple = ('a', 'b', 'c', 'd')

for item in my_tuple:
    print(item)

Output:

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