Re: [Tutor] returning two values continued

2008-03-23 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote > def returning (): >a = 1 >b = 2 >return a, b > > > ab = returning() > > > does this work? > > if it does, is ab a tuple of 2 and [0] being a and [1] being b? Try it in the >>> prompt, thats what its there for and will give you an instant answ

Re: [Tutor] returning two values continued

2008-03-23 Thread Marc Tompkins
On Sun, Mar 23, 2008 at 4:41 PM, elis aeris <[EMAIL PROTECTED]> wrote: > def returning (): > a = 1 > b = 2 > return a, b > > > ab = returning() > > > does this work? > I cut and pasted into an interactive Python session: >>> def returning (): ... a = 1 ... b = 2 ... retur

[Tutor] returning two values continued

2008-03-23 Thread elis aeris
def returning (): a = 1 b = 2 return a, b ab = returning() does this work? if it does, is ab a tuple of 2 and [0] being a and [1] being b? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor