python iterate through list by string matching
<p>I have a list of strings and if the string in my list appears in the filename then I want python to open the file. The catch is, I want python to open the files in the order the string appears in my list. My current code opens the files in the order python wants and only checks if the string in the list appears in the filename.</p>

<p>files</p>

<pre><code>dogs.html
cats.html
fish.html
</code></pre>

<p>python</p>

<pre><code>list = ['fi', 'do', 'ca']
for name in glob.glob('*.html'):
  for item in list:
    if item in name:
      with open(name) as k:
</code></pre>
