title: closures with two inner functions python
body: <p>I am trying to write a closure with two inner functions, but I am getting the below error</p>
  
  <pre><code>def factory(n=0):
  #n=0
  
      def current():
         return n
      return current
      def counter():
          n=n+1
          return n
      return counter
  
  
    f_current,f_counter = int(input())
  
    print(f_counter())
    print(f_current())
  </code></pre>
  
  <p>I have the below error:</p>
  
  <pre><code>   &gt;&gt;4
     Traceback (most recent call last):
     File "C:/Users/lokesh/Desktop/python/closure3.py", 
      line 13, in &lt;module&gt;
     f_current,f_counter = int(input())
     TypeError: 'int' object is not iterable
  </code></pre>
  
  <p>My requirement is after giving input 4,it should display: </p>
  
  <pre><code>  4
    5
  </code></pre>
  
  <p>I am new to python, can somebody help me here... thanks in advance</p>