Python loop optimization

I am currently working with a file with more than 2 million lines. I've separated the lines into lists of elements (ex: [a,b,c,d] = 1 line, words separated). I'm trying to use the following code t...