Thread
:
Appending to a certain index in a list
View Single Post
May 8th, 2006, 11:36 PM
#
9
Dietrich
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power:
4
Actually I found it in one of the Python Reference Manuals:
Quote:
s.insert(i, x) same as s[i:i] = [x] if i >= 0
also i == -1 inserts before the last element
Didn't give it much attention until hydroxide mentioned it.
__________________
I looked it up on the Intergnats!
Dietrich
View Public Profile
Find More Posts by Dietrich