title: How to remove a substring from a string based on list of strings
body: <p>I have a list of strings(colors), say </p>
  
  <pre><code>l = ['chocolate brown','brown','chocolate']
  </code></pre>
  
  <p>I have a string:</p>
  
  <pre><code>sentence = "The jeans is chocolate brown in color and has brown colored pockets"
  </code></pre>
  
  <p>I have to remove <code>chocolate brown</code> and <code>brown</code> from the string. This is just an example. Basically whenever I encounter a color in a string I have to remove it if it exists in the list of colors. What is the efficient way to do it? </p>
  
  <p>One approach that I thought was to split the string into trigrams, bigrams and unigrams. But joining these n-grams back and consistently between all n-grams would be a problem. </p>
  
  <p>My original list is too huge and the string is short. I need an efficient solution since I have to loop over all the elements of the list. Is it possible if I could check the string for the color and then check if that color is in the list. Wouldn't that be an efficient solution?</p>