title: How to check if the header contains the string "example@example.com"?
body: <p>I want to check if the From header contains the email address noreply@youtube.com:</p>
  
  <pre><code>if msg['From'] =='noreply@youtube.com':
    count+=1
  </code></pre>
  
  <p>This does not add one to the count because the header actually contains 'YouTube noreply@youtube.com'.</p>
  
  <p>How can I adapt my code so it adds one to the counter, checking that it contains 'noreply@youtube.com' anywhere in the header?</p>