Accessing items based off list of indices in iterables
<p>I have about 40 million lines of text to parse through and I want to treat each line as a split string and then ask for multiple slices (or subscripts, whatever they are called) using a list of numbers I generate in a method.</p>

<pre><code># ...
other_file = open('output.txt','w')
list = [1, 4, 5, 7, ...]
for line in open(input_file):
    other_file.write(line.split(',')[i for i in list])
</code></pre>

<p>the subscript can't take this generator I have shown, but I want to ask the split line for multiple entries in it without having to iterate through the list in every line. </p>

<p>I apologize, I know this is a simple answer but I just can't think of it. It's so late!</p>
