Is it possible to skip lines in a for statement? i.e....
for line in xrange(len(lines)):
if line is True and line+1 is True and line+2 is True
do something....
I'd like to skip ahead to line+3 in the next for loop after this one, because I have already looked at line+1 and line+2.
I have looked at continue and break as solutions but they do not seem to really solve the issue.
EDIT - To add on some clarification.... The data (text files) I am looking at don't simply come in sets of 3....I am going through football game logs...to give an example of code: Denver kicks off to Kansas City Kansas City returns the ball to the 20 yard line Kansas City offense, Q1 and 15:00 left to go Kansas City uses shotgun and gains 6 yards Denver called a dime defense
The last 3 lines would basically be a play and would give me all the pertinent info I need (Offense, Defense, plays called, yards gained, etc)... But the first two lines are a kickoff and I do not want to process those lines..
Hopefully this will provide clarity.