Hey Max, Danny Yoo wrote: > [Forwarding to tutor. Can someone answer Max? Slightly busy at the > moment. Quick note: get him to realize that the list he was playing > with originally had three elements. The example in his book has two > elements. Something has to change. *grin*] > > > ---------- Forwarded message ---------- > Date: Fri, 19 Jan 2007 10:10:04 -0800 (PST) > From: Max Jameson <[EMAIL PROTECTED]> > To: Danny Yoo <[EMAIL PROTECTED]> > Subject: Re: [Tutor] (no subject) > [...] > This is exactly how the tutorial reads (I omited the definition of the > aList and anoterh): >>>> aList.append(another) >>>> print aList > [42, [1, 2, 7]] I suspect I didn't see the definition of 'aList' on Alan's website, but the values look different than what you posted originally.
Based on the output above, I'd say: aList = [42,] another = [1, 2, 7] Whereas your definition, in your original email: aList = [2,3] bList = [5,7,9] Do you see the difference between the two (aside from the different variable names)? > I expected to get the third element of the second list printed In your example, that would be the 'second' item in your bList (because lists are zero-based): bList[2] == 9 After 'append'ing bList to aList, aList has three items. Try this at the python command line: print aList[0] print aList[1] print aList[2] Two of those will be integers, One will be a list. I hope that helps. Eric. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor