title: prefix matching in python
body: <p>I have a string like:</p>
  
  <pre><code>" This is such an nice artwork"
  </code></pre>
  
  <p>and I have a tag_list <code>["art","paint"]</code></p>
  
  <p>Basically, I want to write a function which accepts this string and taglist as inputs
  and returns me the word "artwork" as artwork contains the word art which is in taglist.</p>
  
  <p>How do i do this most efficiently?</p>
  
  <p>I want this to be efficient in terms of speed </p>
  
  <pre><code> def prefix_match(string, taglist):
          # do something here
       return word_in string
  </code></pre>