title: Regex Split string of arithmetic expression into list with its operators and numbers (decimal included)
body: <p>I have made this code, but i don't think it's the best way.</p>
  
  <pre><code>import re
  notation = "41*(5.5+6-(8/2^3)-7)-1"
  n2 = [x[0] for x in re.findall(r"(\d+(\.\d+)?)",notation)]
  n2.reverse()
  m = []
  x = True
  
  for z in notation:
      if z.isdigit() and x:
          m.append(n2.pop())
          x = False
      if not z.isdigit() and z != ".": 
          m.append(z)
          x = True
  </code></pre>
  
  <p>The expected output is:</p>
  
  <blockquote>
    <p>m = ['41', '*', '(', '5.5', '+', '6', '-', '(', '8', '/', '2', '^', '3', ')', '-', '7', ')', '-', '1']</p>
  </blockquote>
  
  <p>I think this code has a kind of hardcoding, my doubt is how would you make it in a better way?</p>