Iterate over lines that start with a number
<p>I have a file that has many lines, the first four lines start with some letters (a word) and the rest start with a number. I want to iterate over the lines that start with a number (three-digit number, eg '123' followed by different variables containing both letters and numbers) and ignore the first 4 lines. This is what I have done, but it gives me a blank list in an output.</p>

<pre><code>number = []  
for line in infile.readline():  
    line = line.rstrip()  
    if line.startswith('[0-9]'):
        number.append(line.split()[0])  
print number
</code></pre>

<p>Why is the 'number' list empty in my output?</p>

<p>This is what the infile looks like:  </p>

<pre><code>Value = 152  
Numb = 0.005  
Pos = 75  
Samp = 12.5  
150    K    0.345  
234    T    0.764  
565    X    0.345 
</code></pre>
