title: Functions in python return variable
body: <p>Hey i need a help regarding the following code which i have found on edx practice session!</p>
  <pre><code>        def foo(x, y = 5):
             def bar(x):
               return x + 1
             return bar(y * 2)
        
          foo(3)
  </code></pre>
  <p>The first step is that the number 3 will go into the x variable in foo as the y has been already give 5. so foo(3,5). second step is def bar(3) which should return 4 right but why will this step go directly to return bar( y * 2) which is bar (5*2) and then return bar(10) and return 11.</p>