title: Trying to find the prime factoring of a number, but it returns nested lists
body: <p>I'm having some issues with the output of the function to be a pile of nested lists. I'm trying to recursively make a tree of the factors until I end up with only having factors which are primes.</p>
  <pre><code>def getPrimeFactorHelper(x):
      r = []
      getPrimeFactor(x,r)
      return r
  
  def getPrimeFactor(x,r):
      x = int(x)
      if is_Prime(x) == True:
          r.append(x)
          return r
      z = getLowestFactors(x)
      r.append(getPrimeFactor(z[0],r))
      r.append(getPrimeFactor(z[1],r))
      return r
  </code></pre>
  <p>Well currently it gives me the correct numbers as far as I have been able to figure, but its creating nested lists which isn't what I really want as result.</p>
  <p><strong>Outputs:</strong></p>
  <p>(3242) <code>[2, [...], 1621, [...]]</code>
  the [...]</p>
  <p>is the same list again.</p>
  <p>Another out where it's even worse:</p>
  <p>(48)
  <code>[2, [...], 2, [...], 2, [...], 2, [...], 3, [...], [...], [...], [...]]</code></p>