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