title: How to get the first occurence of the element in the list from a given string?
body: <pre><code>string = 'get selected items from the list'
  
  lst_keywords = ['list', 'selected', 'python', 'subset']
  
  res = [ele for ele in lst_keywords if(ele in string)] 
  
  then res = ['list', 'selected']
  </code></pre>
  
  <p>But I only want the first occurrence of element present in the string, like in the string since selected comes first I just want res to output <code>selected</code> only excluding the <code>list</code> element from res.</p>
  
  <p>Any ideas of how I can achieve that?</p>