[Tutor] returning two values

elis aeris hunter92383 at gmail.com
Sat Mar 22 01:11:50 CET 2008


oh this is brillant, i LOVE python

thank for replying

On Fri, Mar 21, 2008 at 5:11 PM, Gregor Lingl <gregor.lingl at aon.at> wrote:

>  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.orghttp://mail.python.org/mailman/listinfo/tutor
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080321/a2bee429/attachment.htm 


More information about the Tutor mailing list