title: How to compare each element of two lists in python
body: <p>I am looking for a Python operator similar to %in% in R. It compares all elements in a list to all elements to another list and returns a boolean array. It would do the following:</p>
  
  <pre><code>a=['word1','word2','word3','word4']
  b=['word2','word4']
  a *%in%* b
  &gt;&gt;False True False True
  </code></pre>
  
  <p>The closest thing I have found is pd.str.contains but it is not vectorized, i.e. it only looks for one element. Hopefully somebody knows.</p>