question about functions
Heiko Wundram
modelnine at ceosg.de
Fri Apr 15 01:04:18 EDT 2005
Am Freitag, 15. April 2005 06:44 schrieb chris patton:
> In other words, can I call the arguments from a list?
Yes.
>>> def testfunc(*args):
... print args[0]
... print args[1]
...
>>> testfunc("this is","a test")
this is
a test
Read up on positional and keyword arguments (the latter are something that'd
make me choose python over anything else instantly) in the Python tutorial
and documentation.
--
--- Heiko.
listening to: Pearl Jam - Given To Fly
see you at: http://www.stud.mh-hannover.de/~hwundram/wordpress/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050415/10e0e26f/attachment.sig>
More information about the Python-list
mailing list