Re-inserting data
Daley, MarkX
markx.daley at intel.com
Tue Mar 21 16:09:48 EST 2000
Some clarification is necessary as to my earlier message. Here is what the
nesting is like.
result = [(a, b, c, d, e), (a1, b1, c1, d1, e1),...]
I guess this is a list of tuples. Will this code work for this application?
>>> 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]
>>>
(Thanks to Alex for this code)
Thanks for helping the newbie.
- Mark
More information about the Python-list
mailing list