title: recursive function in python but with strange return
body: <p>I am trying to solve a primary equation with several variables. For example:11x+7y+3z=20. non-negative integer result only.</p>
  
  <p>I use code below in python 3.5.1, but the result contains something like [...]. I wonder what is it?
  The code I have is to test every variables from 0 to max [total value divided by corresponding variable]. Because the variables may be of a large number, I want to use recursion to solve it. </p>
  
  <pre><code>def equation (a,b,relist):
      global total
      if len(a)&gt;1:
          for i in range(b//a[0]+1):
              corelist=relist.copy()
              corelist+=[i]
              testrest=equation(a[1:],b-a[0]*i,corelist)
              if testrest:
                  total+=[testrest]
  
          return total
      else:
  
          if b%a[0]==0:
              relist+=[b//a[0]]            
              return relist
          else:
              return False
  
  
  total=[]
  re=equation([11,7,3],20,[])
  
  print(re)
  </code></pre>
  
  <p>the result is</p>
  
  <pre><code>[[0, 2, 2], [...], [1, 0, 3], [...]]
  </code></pre>
  
  <p>change to a new one could get clean result, but I still need a global variable:</p>
  
  <pre><code>def equation (a,b,relist):
  global total
  if len(a)&gt;1:
      for i in range(b//a[0]+1):
          corelist=relist.copy()
          corelist+=[i]
          equation(a[1:],b-a[0]*i,corelist)
  
      return total
  else:
  
      if b%a[0]==0:
          relist+=[b//a[0]]
          total+=[relist]
          return 
      else:
          return
  
  total=[]
  print(equation([11,7,3],20,[]))
  </code></pre>