title: Replacing text in a string gives TypeError: 'in <string>' requires string as left operand, not list
body: <p>I am trying to censor some words by replacing them, but it's giving the error: <code>TypeError: 'in &lt;string&gt;' requires string as left operand, not list</code>.</p>
  
  <pre><code>def censor(text, blacklist):
      if blacklist in text:
         text= text.replace(blacklist, "*" * len(blacklist))
      return text
  
  censor("this is annoying me", ["annoying"]) 
  </code></pre>