tuple of tuples to list python code example
Example 1: python tuple to list
my_tuple = (1, 2, 3)
print( list(my_tuple) ) # [1, 2, 3]
Example 2: 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')