title: Python Recursive Merge Sort Not Working
body: <p>I'm trying to implement a recursive merge sort algorithm with only functions that return nothing but I am having difficulty getting it to work. It seems as though it is breaking down the lists and sorting them correctly but is not carrying over those sorted lists into the next recursive call.</p>
  
  <pre><code>def merge(list1, list2):
      result = []
      i = 0
      j = 0
      k = 0
      while i &lt; len(list1) and j &lt; len(list2):
          if list1[i] &lt; list2[j]:
              result.append(list1[i])
              i+=1
          else:
              result.append(list2[j])
              j+=1                
          k+=1
      while i &lt; len(list1):
          result.append(list1[i])
          i+=1
          k+=1
      while j &lt; len(list2):
          result.append(list2[j])
          j+=1
          k+=1
      print(result)
  
  
  def merge_sort(inplist):
      if int(len(inplist)) &gt;1:
          mid = len(inplist)//2
          left = inplist[0:mid]
          right = inplist[mid:]
          merge_sort(left)
          merge_sort(right)
          merge(left,right)
  
  
  test = [1,4,7,2,6,9,8,5,3,0]
  merge_sort(test)
  print(test)
  </code></pre>