Thanks both @Nick_Boyts and @Giovanni_Brogiolo for the response. I’m creating list using append, but I’m looking a bit further. I can’t manage to get the algorith to do the task mentioned above.

I could get the indices from the “existe” and “no existe” elements, but I need to get the indices in the same list.

```
inic_tramo =[]
for i in range(len(tras_arriba)):
aux = []
for j in range(len(tras_arriba[i])):
if tras_arriba[i][j] == 'existe':
aux.append(j)
else:
j = j+1
inic_tramo.append(aux)
fin_tramo = []
for i in range(len(tras_arriba)):
aux = []
for j in range(len(tras_arriba[i])):
if tras_arriba[i][j] == 'no existe':
aux.append(j)
else:
pass
fin_tramo.append(aux)
OUT = (inic_tramo,fin_tramo)
```