title: How to match a substring in a string, ignoring case
body: <p>I'm looking for ignore case string comparison in Python.</p>
  
  <p>I tried with:</p>
  
  <pre><code>if line.find('mandy') &gt;= 0:
  </code></pre>
  
  <p>but no success for ignore case. I need to find a set of words in a given text file. I am reading the file line by line. The word on a line can be <em>mandy</em>, <em>Mandy</em>, <em>MANDY</em>, etc. (I don't want to use <code>toupper</code>/<code>tolower</code>, etc.).</p>
  
  <p>I'm looking for the Python equivalent of the Perl code below.</p>
  
  <pre><code>if ($line=~/^Mandy Pande:/i)
  </code></pre>