Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

list of tuple to tuple of list python

>>> source_list = [('1','a'),('2','b'),('3','c'),('4','d')]
>>> list1, list2 = zip(*source_list)
>>> list1
('1', '2', '3', '4')
>>> list2
('a', 'b', 'c', 'd')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #list #tuple #tuple #list #python
ADD COMMENT
Topic
Name
6+5 =