title: add parameters dynamically in python
body: <p>I want to know if there's a way which allows you, when calling a function, you can add parameters dynamically. For example,</p>
  
  <pre><code>def getParameters( num ):
  
    parray = [i for i in range(num) ]
    params = tuple( parray )
    return params
  
  def func(*args, **kws):
    pass
  </code></pre>
  
  <p>Each time, when calling the function <em>func</em>, the number of parameters is decided by the function <em>geParameters</em>, which is unknown until the code is executed.</p>
  
  <p>For example, in the code, someone may do this:</p>
  
  <pre><code>param1 = getParameters(2)
  //He wants to use param1 to the func
  //which would be func(1, 2, 3, 4)
  
  param2 = getParameters(6)
  //Likewise, this would be func(1, 2, 3, 4, 5, 6)
  </code></pre>
  
  <p>But i can't directly pass the tuple to the function, python would treat it as a single parameter in that way. </p>
  
  <p>Since the *args is a tuple, which contains those extra parameters, is there a way to replace <em>*args</em> with <em>param1</em>.
  (Also, the same thing to **kws)</p>
  
  <p>Thank you in advance!</p>