I am reading in a file in python:
alist = [line.rstrip() for line in f]
for line in alist:
if line[10] == 4:
hop over 4 lines
Example of the text file:
- line1
- line2
- line3
- line4
- line has 4 blabla
- line want to skip over
- line want to skip over
- line want to skip over
- line want to skip over
When the 10 element in a line is x (some number 1,2,3,4,..) I want to hop over the equal amount of lines. I have searched for an answer for a long time but I can't find anything, help please!