Re-inserting nested data

Alex alex at somewhere.round.here
Tue Mar 21 20:26:23 CET 2000


> I'm at a loss as to how I can re-insert the converted data to the
> location I pulled it from, essentially re-writing the data that was
> there.

> >>> l = range (10)
>>> l[5] = 6
>>> print l
[0, 1, 2, 3, 4, 6, 6, 7, 8, 9]
>>> l[4:7] = [3, 19, 20]
>>> print l
[0, 1, 2, 3, 3, 19, 20, 7, 8, 9]
>>> 

Hope this helps.
Alex.



More information about the Python-list mailing list