I have the following list (which is much larger in reality)
[(1, 2, 3),
(1, 2, 3),
(1, 2, 3)]
and would like to insert 2 columns to it so it results in
[(c1, 1, c2, 2, 3),
(c1, 1, c2, 2, 3),
(c1, 1, c2, 2, 3)]
the best which I came up with is the following
mylist = [(1, 2, 3),(1, 2, 3),(1, 2, 3)]
mylist_new = []
for i in mylist:
mylist_new.append(('c1', i[0], 'c2', i[1], i[2], i[3]))
any alternative suggestions on how to achieve this?