Converting a tuple to an argument list for a method?

Andreas Kostyrka andreas at mtg.co.at
Thu Oct 18 06:40:55 EDT 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Donnerstag, 18. Oktober 2001 11:47 schrieb Gabriel Ambuehl:
> Hello,
> I'm messing with the XMLRPC implementation from PythonWare which
> makes the arguments to the request available as tuple but the
> method's
> I want to call expect a normal argument list as their parameters.
>

import string

list=["1","2","3"]
args=(list,", ")
print apply(string.join,args)

Andreas
- -- 
Andreas Kostyrka; Raiffeisenstr. 16/9; 2320 Zwölfaxing
Tel: +43/676/4091256; Fax: +43/1/7065299
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7zrG6HJdudm4KnO0RAk/PAJ4thNN+ziJDplmDI6w1SFcvc8Vb/ACg0VJy
gsItHkwbjLVdzBpKL4mnCmo=
=05vY
-----END PGP SIGNATURE-----




More information about the Python-list mailing list