A query about list

Dave Benjamin ramen at lackingtalent.com
Thu Oct 9 17:19:18 EDT 2003


In article <pan.2003.10.09.21.16.17.434674 at softhome.net>, Santanu Chatterjee wrote:
> I was trying something like a.insert(1,a.pop(1)) but I need to
> modify a.pop(1) somehow so that the brackets vanish ...you know
> what I mean. Is that possible ? 

Ahh, I see what you mean, now. You probably want slice assignment.

Try, for starters:
a[1:2] = a[1]

You'll probably still need to use type().

Dave

-- 
.:[ dave benjamin (ramenboy) -:- www.ramenfest.com -:- www.3dex.com ]:.
: d r i n k i n g   l i f e   o u t   o f   t h e   c o n t a i n e r :




More information about the Python-list mailing list