title: Printing multiple files along with file names
body: <p>I have a folder with unknown number of subfolders eg: say sb1 sb2 sb3 sb4... sbn
  Every sub folder has a file readme.txt
  I can iterate through all folders and readme.txt file inside that folder and print lines that start with 'This is how you'</p>
  <p>I'm able to print them like this:</p>
  <pre class="lang-none prettyprint-override"><code>sb1: This is how you install Python
  sb1: This is how you install Django
  sb1: This is how you create virtual environment
  sb2: This is how you upgrade your Mac
  sb2: This is how you upgrade Windows operating system
  sb2: This is how you blah blah blah
  </code></pre>
  <p>But I need to have the output like below: Basically group the output from a particular sub folder into a section ..rather than printing the subfolder name every time.</p>
  <pre class="lang-none prettyprint-override"><code>######## SB1 #########
  This is how you install Python
  This is how you install Django
  This is how you create virtual environment
  
  ######## SB2 #########
  This is how you upgrade your Mac
  This is how you upgrade Windows operating system
  This is how you blah blah blah
  </code></pre>
  <p>Code:</p>
  <pre><code>for root, dirs, files in os.walk(os.getcwd(), onerror=None):
      for filename in files:  # iterate over the files in the current dir
          if filename == 'readme.txt':
              file_path = os.path.join(root, filename)
              with open(file_path, 'r') as fp:
                  for line in fp:
                      if line.startswith('This is how'):
                          result.add(os.path.relpath(file_path) + &quot;:&quot; + line)
  </code></pre>