converting list to multiple parameters

Oliver Rutherfurd oliver at
Thu Sep 14 00:15:22 CEST 2000


I'd like to pass an list of values to struct.pack(), but it tells me that
the parameters need to be strings.  It there a way I can convert the list to
a bunch of parameters?

so instead of:

x = struct.pack("3s3s3s", a, b, c)

I could do:

x = struct.pack("3s3s3s", thelist)

oliver at

More information about the Python-list mailing list