title: How to group lines separated by a blank line more pythonically
body: <p>I have a file that contains a list of duplicate, but uniquely named files.</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;md5sum&gt;  /var/www/one.png
  &lt;md5sum&gt;  /var/www/one-1.png
  
  &lt;md5sum&gt;  /var/www/two.png
  &lt;md5sum&gt;  /var/www/two-1.png
  &lt;md5sum&gt;  /var/www/two-2.png
  </code></pre>
  
  <p>The goal is to end up with the following:</p>
  
  <pre><code>[
      [
          '/var/www/one.png',
          '/var/www/one-1.png'
      ],
      [
          '/var/www/two.png',
          '/var/www/two-1.png',
          '/var/www/two-2.png'
      ]
  ]
  </code></pre>
  
  <p>This is output from a command I ran earlier. Now I need to process this output, and I came up with the following code for starters:</p>
  
  <pre><code>from pprint import pprint
  DUPES_FILE = './dupes.txt'
  
  def process_dupes(dupes_file):
      groups = [[]]
      index = 0
      for line in dupes_file:
          if line != '\n':
              path = line.split('  ')[1]
              groups[index].append(path)
          else:
              index += 1
              groups.append([])
  
      pprint(groups)
  
  with open(DUPES_FILE, 'r') as dupes_file:
      process_dupes(dupes_file)
  </code></pre>
  
  <p>Is there a more concise way to write this?</p>