title: Can I create a list of elements based on different chain of characters from a string in Python?
body: <p>I would like to create a list from a string by separating it by multiple chain of characters.<br />
  For example, I have the three strings as bellow:</p>
  <pre><code>a = &quot;~O~O~O~OP&quot;
  b = &quot;PO~O~~OO~&quot;
  c = &quot;~O~O~O~OP~O~OO~&quot;
  </code></pre>
  <p>I would like to create a list that would separate the &quot;P&quot;, the &quot;~O&quot; and the &quot;O~&quot; in the right order.
  It would so give me:</p>
  <pre><code>list_a = [&quot;~O&quot;,&quot;~O&quot;,&quot;~O&quot;,&quot;~O&quot;,&quot;P&quot;]
  list_b = [&quot;P&quot;,&quot;O~&quot;,&quot;O~&quot;,&quot;~O&quot;,&quot;O~&quot;]
  list_c = [&quot;~O&quot;,&quot;~O&quot;,&quot;~O&quot;,&quot;~O&quot;,&quot;P&quot;,&quot;~O&quot;,&quot;~O&quot;,&quot;O~&quot;]
  </code></pre>
  <p>As you can see, the lecture has to be done from the beginning of the string until the end and avoiding double reading.</p>