I have a list like the following:
[[10,10], [20,30], [30,50], [40, 60]]
I want to add elements between every one of theme in order to obtain a list like:
[[10,10], [15, 20], [20,30], [25, 40], [30,50], [35, 55], [40, 60]]
My code is
`for i,j in enumerate(sub_list):
list1.insert(i,j)`
where sub_list is [[15, 20], [25, 40], [35, 55]]
.
Output is : [[10, 10], [15, 20], [25, 40], [35, 55], [20, 30], [30, 50], [40, 60]]
Problem is that at the first insertion everything is shifted of course. What should I do ?