title: Does return finishes a function on Python?
body: <p>I'm learning on codeacademy and I was trying to print the following:</p>
  
  <pre><code>def trip_cost(p, d, m):
      return rental_car_cost(d) + hotel_cost(d) + plane_ride_cost(p) + m
      print "%s to %s for %s days with an extra %s dollars of spending mone" (trip_cost(p, d, m), p, d, m)
  </code></pre>
  
  <p>The program was telling me nothing was printing on the console, so I proceeded to delete the return line and it worked, so I was wondering if every time a function reaches a <code>return</code> it finishes, in that case in the following code I could've save the "and days &lt; 7" ?? </p>
  
  <pre><code>def rental_car_cost(days):      
      cost = days*40
  
      if days &gt;= 7:
          cost -= 50
          return cost    
      elif days &gt;= 3 and days &lt; 7:
          cost -= 20
          return cost
      print cost        
  </code></pre>