comparing contents of two files using python
<p>I have a file name exclusionlist.txt and i have contents in it like</p>

<pre><code>          import os
          import re
          import subprocess
          ......and many more
</code></pre>

<p>I have another file named libraries.txt and the contents of this file are</p>

<pre><code>         import mymodule
         import empmodule,os
         import subprocess
         import datetime,logging,re
         .......and many more
</code></pre>

<p>My question is that from python how to know that the contents which are in exclusionlist.txt is also present in libraries.txt since here it is jumbled up..</p>

<pre><code>         f = open('exclusionlist.txt', 'r')
         f.read()

         f1= open('libraries.txt', 'r')
         f1.read()

        if (//Is contents of f1 present in f2):
             print libraries found
        else:
             print not found

        f.close()
        f1.close() 
</code></pre>
