Re: [Tutor] appending to a list

2008-01-31 Thread Alan Gauld
David Bear [EMAIL PROTECTED] wrote I want to return a tuple from a function. I want to append the second element of that tupple to a list. For example mylist = [] def somefunc(): return(3.14, 'some string') somenum, mylist.append(??) somefunc() obviously, the syntax doesn't work. The

[Tutor] appending to a list

2008-01-30 Thread David Bear
I want to return a tuple from a function. I want to append the second element of that tupple to a list. For example mylist = [] def somefunc(): return(3.14, 'some string') somenum, mylist.append(??) somefunc() obviously, the syntax doesn't work. This should be easy, but I've never seen

Re: [Tutor] appending to a list

2008-01-30 Thread Bill Campbell
On Wed, Jan 30, 2008, David Bear wrote: I want to return a tuple from a function. I want to append the second element of that tupple to a list. For example mylist = [] def somefunc(): return(3.14, 'some string') somenum, mylist.append(??) somefunc() obviously, the syntax doesn't work. This