title: Create a list everytime I encounter a certain word in a str
body: <p>My problem is that I wanted write a code that did that:</p>
  
  <pre><code>    input =&gt; str_of_words = '&lt;post&gt;30blueyellow&lt;post&gt;2skyearth&lt;post&gt;5summerwinter'
      output =&gt; post30 = ["blue","yellow"]
                post2 = ["sky","earth"]
                post5 = ["summer", "winter"]
  </code></pre>
  
  <p>At first I thought I could do something like</p>
  
  <pre><code>     if "&lt;post&gt;" in str_of_words:
           occurrence = str_of_words.count("&lt;post&gt;")
           #and from there I had no idea how to continue coding it
  </code></pre>
  
  <p>So I feel like I could ask if anyone knew some tricks to do that </p>