I have two lists:
list_one = [3 5 3 5 3 5 5 5 3 3 5 3]
and
list_two = [[2000, 2100], [2200, 2300], [2500, 2600]]
I want to alter the first number in each sublist in list_two
by a corresponding number from list_one
, such that
list_two = [[(2100-3), 2100], [(2300-5), 2300], [(2600-3), 2600)]
I have the following code but it is doing this in the wrong order.
new_list = []
for i in list_two:
for k in list_one:
a = i[1]-k
b = i[1]
c = [a, b]
new_list.append(c)