title: Assigning return value of a function to a variable in Python
body: <p>I have a function which calculate the max in a list:</p>
  
  <pre><code>def max_in_list(list):
      max = 0
      for i in range(len(list)-1):
          if list[i] &gt; list [i+1] and list [i] &gt; max:
              max = list[i]
          elif list[i +1] &gt; max:
              max = list [i+1]
  
  print max       
  </code></pre>
  
  <p>another one to map the lenght of strings to a new list</p>
  
  <pre><code>def maps(list):
      list_integer = []
      for i in list:
          list_integer.append(len(i))
  
      print list_integer
  </code></pre>
  
  <p>and I want to calculate the longest word with this one:</p>
  
  <pre><code>def the_longest_word(list):
  
      new_list = maps(list)
      max_in_list(new_list)
  </code></pre>
  
  <p>It looks like the first function return None. My question is how can I assign the returned value to a variable so I can use it in the second function?</p>