title: translating gsub command from R into Python
body: <p>I want to split this mystring="0G15^GAC0T60T4^AA0C0" and get the following output with python:</p>
  
  <pre><code>['0','G','15','^GAC','T','60','T','4','^AA','C']
  </code></pre>
  
  <p>It could be done with this command in R:</p>
  
  <pre><code>mystring &lt;- "0G15^GAC0T60T4^AA0C0"
  gsub("([\\^]*[ACGT]+)[0]*", " \\1 ", mystring)
  </code></pre>
  
  <p>how can I translate the R script into python?</p>
  
  <p>Thanks</p>