title: How to remove a particular substring from a list of strings?
body: <p>I have two lists,</p>
  
  <pre><code>y1=['fem j sex / male \n', "  father's name  diwan singh saggu   \n", "elector's name   rahul saggu \n", 'identity card \n', 'zfk0281501', 'age as on 1.1.2008   23 \n']
  
  word=["sex","father's","name","elector's","name","identity","card","age"]
  </code></pre>
  
  <p>I need to remove all the strings in <code>y1</code> which is in <code>word</code>.
  I need to get output as</p>
  
  <pre><code>output=['fem j /male','diwan singh saggu','rahul saggu','zfk0281501','as on 1.1.2008 23']
  </code></pre>
  
  <p>I have split individual elements in y1 and tried comparing it with word.But i dont know what to do next? How to remove the strings??Here is what i tried, </p>
  
  <pre><code>y1new=[]
  for y in y1:
      tmp=y.split()
      y1new.append(tmp)
  for i in y1new:
      for j in i:
          if j in word:
              y1new[i].remove(y1new[i][j])
  </code></pre>
  
  <p>How can i achieve this?</p>