(1, 2, 6)
How to iterate through the items in a Python tuple?
We can iterate through the items in a Python tuple using a for loop. For example,
numbers = (1, 5, 23, 67, 2, 456, 87, 5)
for i in numbers:
print(I)
The above program will print the numbers stored in the tuple โnumbersโ. The program will print the following output:
1 5 23 67 2 456 87 5








































0 Comments