title: Recursively find the lowest number in a list.
body: <p>I wrote some code for my recursive functions homework. I want to find the smallest number in the list. Why doesn't this code work? For example, when I enter 2,-99, and 110 the program returns -99 but when I enter 2,5,-9 it returns 2. I can't understand what the problem is.</p>
  
  <pre><code>def rcompare(numList):
      end=len(numList)-1
      if(end==-1):
          return 0
      else:
          if (end!=-1):
              swapped=-1
              for i in range(0,end):
                  if (numList[i]&gt;numList[i+1]):
                      numList[i],numList[i+1]=numList[i+1],numList[i]
                      swapped=i
              end=swapped
              return numList[0]
  numList=input("Please enter some numbers seperated by comma: ").split(",")
  numList=[int(i) for i in numList]
  print(rcompare(numList))
  input()
  </code></pre>