title: using *args in struct.pack
body: <p>I just read about the *args and **kwargs notation in python and decided to use it with my functions that use struct.pack as such:</p>
  
  <pre>
  def pack_floats(*args):
  
     return struct.pack('%df' %len(args), args)
  </pre>
  
  <p>But of course, it doesn't work because args is a tuple. If I wanted to pack three numbers, I would call pack as such</p>
  
  <pre>
  struct.pack('3f', 1, 2, 3)
  </pre>
  
  <p>Alternatively I could just run it through a loop and pack one number at a time, but I don't know whether there is any performance difference between one value at a time vs all values at a time.</p>
  
  <p>Is there a way to write the pack_floats function without calling the pack function inside a loop?</p>