return multiple objects
vincent at vincentdavis.net
Fri Feb 6 04:03:01 CET 2009
Is it correct that if I want to return multiple objects from a function I
need to in some way combine them?
a = [1,3,5,7]
b = [2,4,6,8]
return a, b # this does not work?
return [a, b] # does not work?
return c # this works but I don't like it, , is there a better way?
I saw examples where dictionaries where used but I would prefer to
just access the object names directly. As in
print a # not haing to refer to it as
is there something I am missing?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list