Iterate over Items of a Tuple
To iterate over items of a Tuple in Python, use for loop. During each iteration, we get access to an element from Tuple corresponding to that iteration.
Iterate over Tuple of Integers
In the following program, we take a tuple
x, and iterate over its elements using For Loop.
aTuple = (2, 5, 8) for x in aTuple: print(x)Try Online
2 5 8
In this Python Tutorial, we learned how to iterate over items of a Tuple in Python using For Loop.