w3resource logo


Python Exercises

Python Exercise: Unzip a list of tuples into individual lists

Python tuple: Exercise-17 with Solution

Write a Python program to unzip a list of tuples into individual lists.

Sample Solution :-

Python Code :

>>> #create a tuple
>>> l = [(1,2), (3,4), (8,9)]
>>> printlist((zip(*l)))

Output:

>>>
[(1, 3, 8), (2, 4, 9)]                                     
>>>

Python Code Editor:

#create a tuple
l = [(1,2), (3,4), (8,9)]
print(list(zip(*l)))

Improve this sample solution and post your code through Disqus.



Join our Question Answer community to learn and share your programming knowledge.

Help the community:

Python: Fizzbuzz

C++: Decimal to binary conversion

JavaScript: Need Help in JavaScript

Python: Help me with this program