title: How to make code not print words twice after text.split
body: <pre><code>text = &quot;&quot;&quot; sam 
  may 
  sam 
  gray 
  bet 
  four 
  vet 
  large &quot;&quot;&quot;
  
  find = &quot;a&quot;
  
  words = text.split(&quot;\n&quot;)
  for w in words:
    if find in w:
      print(w)
    else :
      pass
  </code></pre>
  <p>What could I add to make this code not print 'sam' (in this case) twice?</p>