Lists into lists

Siggy Brentrup bsb at winnegan.de
Mon Aug 20 10:54:01 EDT 2001


"Jeff Cohen" <jaif at mindspring.com> writes:

> I'm just learning python, so sorry if this is obvious but I didn't see it in
> the book or a few tutorials I found.
> Now, I did this with
> 
> >>x.insert(0,y)

[...]

> Any help there?

How about inserting a copy of y:
  x.insert(0, y[:])


Siggy

-- 
Siggy Brentrup - bsb at winnegan.de - http://oss.winnegan.de/
****** ceterum censeo javascriptum esse restrictam *******




More information about the Python-list mailing list