View Single Post
Old May 2nd, 2006, 3:34 PM   #3
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
What andro says.
list = range(5)     # create a list of 5 elements, from 0 to 4
list.insert(2, 9)   # change the 3rd element 9 and move the rest forward
# (Indicies start from 0, so the index of 2 refers to the 3rd element)
Arevos is offline   Reply With Quote