title: Can I dynamically pass a list of arguments to a python function with predefined arguments?
body: <p>I have a python function <code>bar(a=None, b=None, c=None, d=None, e=None)</code>. I was wondering if it was possible to build the list of arguments I want to pass in, with a list or a string, or something.</p>
  
  <p>I would have a list of attributes to look for and ideally I would simply loop over them and build the argument string.</p>
  
  <p>For example, something like:</p>
  
  <pre><code>dict = {'a' : 5, 'c' : 3, 'd' :9} 
  arg_string = ""
  for k, v in dict.iteritems():
      arg_string += "{0}={1},".format(k, v)
  
  bar(arg_string)
  </code></pre>
  
  <p>In this case I don't have any values to pass in for b and e, but the next time the program runs there may be.</p>
  
  <p>Is this possible?</p>
  
  <p><strong>I know the string being built in the for loop will probably be invalid because of the comma at the end. But i didn't think it was necessary to write the handling for that</strong></p>