How to display line number of sentence (muliple line) in the first line?
<p>In test.txt, I have 2 lines of sentences.</p>

<pre><code>The heart was made to be broken.
There is no surprise more magical than the surprise of being loved.
</code></pre>

<p>In the codes:</p>

<pre><code>import re
file = open('test.txt','r')#specify file to open
data = file.readlines()
file.close()

print "---------------------------------------------------"
count = 0
for line in data:
    line_split = re.findall(r'[^ \t\n\r, ]+',line)
    count = count + 1
    def chunks(line_split, n):
        for i in xrange(0, len(line_split), n):
            yield line_split[i:i+n]

    separate_word = list(chunks(line_split, 8))

    for i, word in enumerate(separate_word, 1):
        print count, ' '.join(word)
    print "---------------------------------------------------"
</code></pre>

<p>Results from the codes:</p>

<pre><code>---------------------------------------------------
1 The heart was made to be broken.
---------------------------------------------------
2 There is no surprise more magical than the
2 surprise of being loved.
---------------------------------------------------
</code></pre>

<p>Is there any possible way for displaying the number of sentence in the first line only?</p>

<p>Expect results:</p>

<pre><code>---------------------------------------------------
1 The heart was made to be broken.
---------------------------------------------------
2 There is no surprise more magical than the
  surprise of being loved.
---------------------------------------------------
</code></pre>
