title: Search for keyword in string stops when first one is found
body: <p>I'm currently trying to search for keywords + the following word in a string/text. I want to store these keywords in an already created text file (<code>f</code>). I have wrote this code so far:</p>
  <pre><code>def keyword_extraction(text, keyword_list, f):
  
      temp = re.findall(r&quot;[\w']+&quot;, text)
  
      for keyword in keyword_list:
          if keyword in temp:
              results = [temp[temp.index(keyword) + 1]]
              for word in results:
                  f.writelines(keyword + ': ' + word + '\n')
          else:
              f.writelines('Keyword &quot;' + keyword + '&quot; not found\n')
  </code></pre>
  <p>The problem is, whenever the keyword is found, the algorithm stops. But I want to extract all of the keywords, so when they appear twice in a text, they should be written down twice. Do you have any suggestions of how I can fix that?</p>
  <p>Example input:</p>
  <pre><code>text = &quot;today is a sunny day dont you think? I like this day very much&quot;
  keyword_list = ['like', 'day']
  </code></pre>
  <p>Expected output:</p>
  <pre><code>like: this
  day: dont
  day: very
  </code></pre>
  <p>actual output:</p>
  <pre><code>like: this
  day: dont
  </code></pre>
  <p>Thank you for your help!</p>