title: What is the best way to not pass variables down functions in a product code in python?
body: <p>I am beginner to python and I am trying to create a Flask application which uses gevent of gunicorn.</p>
  <p>I have a  function which accepts a number of parameters.
  say, <code>main_function(A,B,C,D,E,F,G,H,I)</code>.</p>
  <p>From this function, I have to call another function, <code>function_one(A,B)</code> which calls another function from within, say <code>function_two(A,B)</code> which in turn calls another function <code>function_three(A,B</code>) and so on.</p>
  <p>At one point it reaches a <code>function_thirtythree</code> which should get the parameters <code>C,D</code> along with A and B.</p>
  <p>Now my question is, do I have to pass C and D to function_one which should then be passed to function_two, then to function_three and so on, only to be used at function_thirty three call ? Is there a better way of doing it ?</p>
  <pre><code>def function_thirtythree(A,B)
      return A + B+ C + D
  
  def function_three(A,B)
      function_thirtythree(A,B)
  
  def function_two(A,B):
      function_three(A,B)
  
  def function_one(A,B):
      function_two(A,B)
  
  
  def main_func(A,B,C,D,E,F,G,H,I):
      function_one(A,B)
  </code></pre>