There are two lists of numbers.
list_1 = [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12]
list_2 = [0, 2, 5, 7, 8]
for i in range(len(list_1)):
for l in list_2:
...
As such, the loop will iterate over all l in list_2 each time
I need to iterate over only the left, center and right elements in each iteration with i.
For i = 0 there will be elements l = [0, 2, 5]
For i = 1 there will be elements l = [2, 5, 7]
For i = 2 there will be elements l = [5, 7, 8]
For i = 3 there will be elements l = [7, 8]
For i = 4 there will be elements l = [8]
For i = 5 there will be elements l = [8]
For i = 6 there will be elements l = [8]
etc