
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How we can iterate through a Python list of tuples?
Easiest way is to employ two nested for loops. Outer loop fetches each tuple and inner loop traverses each item from the tuple. Inner print() function end=’ ‘ to print all items in a tuple in one line. Another print() introduces new line after each tuple.
Example
L=[(1,2,3), (4,5,6), (7,8,9,10)] for x in L: for y in x: print(y, end=' ') print()
Output
1 2 3 4 5 6 7 8 9 10
- Related Articles
- How to iterate through a list in Python?
- Iterate through Quintet class in Java Tuples
- How to iterate through Java List?
- How can I iterate through two lists in parallel in Python?
- How to iterate through a dictionary in Python?
- How to iterate through a tuple in Python?
- How to Iterate over Tuples in Dictionary using Python
- Combining tuples in list of tuples in Python
- How can we iterate the elements of List and Map using lambda expression in Java?
- Count tuples occurrence in list of tuples in Python
- Remove duplicate tuples from list of tuples in Python
- How we can update a Python list element value?
- Iterate over a list in Python
- Update a list of tuples using another list in Python
- Python tuples are immutable then how we can add values to them?

Advertisements