I have a list of values:
list_of_value = [1,3,4,2,3,"start",3,4,5,"stop",5,6,7,6,"start",5,6,7,"stop"]
I need to remove from the list the elements between "start" and "stop" (boundaries included).
The output should be something like:
[1,3,4,2,3,5,6,7,6]
I tried something like this:
for i, el in enumerate(list_of_values):
    if "start" in el:
        start_index = i
    if "stop" in el:
        stop_index = i
        for a in range(start_index,stop_index):
            del list_of_values[a]
but it's not working.
Can you help me?
Thanks, Davide
 
    