title: Python: Recursive function to find the largest number in the list
body: <p>I'm trying to do a lab work from the textbook Zelle Python Programming</p>
  
  <p>The question asked me to "write and test a recursive function <code>max()</code> to find the largest number in a list. The max is the larger of the first item and the max of all the other items." I don't quite understand the question from the textbook.</p>
  
  <pre><code>def Max(list):
      if len(list) &lt;= 1:
          else:
              return list[0]
          else:
              m = Max(list[1:])
              return m if m &gt; list[0] else list[0]
  
  def main():
      list = eval(raw_input(" please enter a list of numbers: "))
      print("the largest number is: ", Max(list))
  
  main()
  </code></pre>
  
  <p>Or maybe I'm suppose to open a txt file with numbers in it and then use recursive?</p>
  
  <p>I believe recursive works like this</p>
  
  <pre><code>def function()
  &gt; if something:
  &gt;&gt;return 0
  &gt;else:
  &gt;&gt;return function()
  </code></pre>