[Tutor] returning two values
Gregor Lingl
gregor.lingl at aon.at
Sat Mar 22 01:11:02 CET 2008
elis aeris schrieb:
> is it possible to return two values?
>
Yes:
>>> def return2():
return "this", "that"
>>> return2()
('this', 'that')
>>> a,b=return2()
>>> a
'this'
>>> b
'that'
>>>
Regards,
Gregor
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080322/f82b3df7/attachment.htm
More information about the Tutor
mailing list