"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 answer: >>> def returning(): ... a = 1 ... b = 2 ... return a,b ... >>> ab = returning() >>> print ab (1, 2) >>> print ab[0] 1 >>> print ab[1] 2 >>> Does that answer your question? -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld Give a man a fish and feed him for a day Teach him to fish and you feed him for life _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor