title: Creating a new column by finding exact word in a column of strings
body: <p>I want to create a new column with 1 or 0, if any of the words in a list is matched exaclty with the dataframe string column.</p>
  
  <pre><code>list_provided=["mul","the"]
  #how my dataframe looks
  id  text
  a    simultaneous there the
  b    simultaneous there
  c    mul why
  </code></pre>
  
  <p><strong>Expected output</strong></p>
  
  <pre><code>id  text                     found
  a    simultaneous there the   1
  b    simultaneous there       0
  c    mul why                  1
  </code></pre>
  
  <p>Second row is assigned 0, since <strong>either of</strong> "mul" or "the" are not exactly matching in the string column "text"</p>
  
  <p><strong>Code tried till now</strong></p>
  
  <pre><code>#For exact match I am using the below code
  data["Found"]=np.where(data["text"].str.contains(r'(?:\s|^)penalidades(?:\s|$)'),1,0)
  </code></pre>
  
  <p>How can I iterate through a loop to find exact match of all the words in the provided list of words?</p>
  
  <p><strong>Edit:</strong>
  If i use str.contains(pattern) as suggested by Georgey, all the rows for data["Found"] becomes 1</p>
  
  <pre><code>data=pd.DataFrame({"id":("a","b","c","d"), "text":("simultaneous there the","simultaneous there","mul why","mul")})
  list_of_word=["mul","the"]
  pattern = '|'.join(list_of_word)
  data["Found"]=np.where(data["text"].str.contains(pattern),1,0)
  
  Output:
  id  text                     found
  a    simultaneous there the   1
  b    simultaneous there       1
  c    mul why                  1
  d    mul                      1
  </code></pre>
  
  <p>The second row in the found column should be 0 here</p>