title: How the y is returning 1 without passing anything to it?
body: <p>Can someone explain to me how the y is returning 1 in this code?</p>
  
  <pre><code>def f(x):
      def g(y):
          print(y)
          return y + x + 3 
      return g
  
  nf1 = f(1)
  
  print(nf1(1))
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>1
  
  5
  </code></pre>