Re: Newbie getting confused again

2005-03-05 Thread It's me
Thanks, got it. "M.E.Farmer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It's me wrote: > > If I have: > > > > a = (1,2,3) > > > > how do I ended up with: > > > > res=[(1), (2), (3), (4), (5)] > > > > without doing: > > > > res=[(a[0]), (a[1]), (a[2]), (4), (5)] > >

Re: Newbie getting confused again

2005-03-05 Thread M.E.Farmer
It's me wrote: > If I have: > > a = (1,2,3) > > how do I ended up with: > > res=[(1), (2), (3), (4), (5)] > > without doing: > > res=[(a[0]), (a[1]), (a[2]), (4), (5)] > > ??? > > ps: This is just a nobrainer example of what my real code is trying to do. > "a" might have many many eleme

Re: Newbie getting confused again

2005-03-04 Thread It's me
*bonk, bonk, bonk* Now I feel better. Thanks, everybody. The "+" is indeed what I was looking for.It just didn't occur to me that this is the way you concatenate two lists together. But of course, that makes sense, doesn't it? Thanks again. "Peter Hansen" <[EMAIL PROTECTED]> wrote in mes

Re: Newbie getting confused again

2005-03-04 Thread Peter Hansen
Peter Hansen wrote: It's me wrote: If I have: a = (1,2,3) Note that this is a tuple. how do I ended up with: res=[(1), (2), (3), (4), (5)] Not that this is a list. The two aren't the same thing. I meant to say "Note" here, not "Not"... in case it wasn't obvious. -Peter -- http://m

Re: Newbie getting confused again

2005-03-04 Thread Peter Hansen
It's me wrote: If I have: a = (1,2,3) Note that this is a tuple. how do I ended up with: res=[(1), (2), (3), (4), (5)] Not that this is a list. The two aren't the same thing. If you don't understand the difference, you might want to review the tutorial or head over to the tutor list. Also

Re: Newbie getting confused again

2005-03-04 Thread John Machin
It's me wrote: > If I have: > > a = (1,2,3) > > how do I ended up with: > > res=[(1), (2), (3), (4), (5)] > > without doing: > > res=[(a[0]), (a[1]), (a[2]), (4), (5)] > If by (x) you really mean a tuple with 1 element i.e. (x,) then you need something like this: >>> a = (1, 2, 3) >>

Newbie getting confused again

2005-03-04 Thread It's me
If I have: a = (1,2,3) how do I ended up with: res=[(1), (2), (3), (4), (5)] without doing: res=[(a[0]), (a[1]), (a[2]), (4), (5)] ??? ps: This is just a nobrainer example of what my real code is trying to do. "a" might have many many elements. That's why the explicit indexing