Here is a sample of what I'd like to do.
str = "This was replaced"
ff item in list:
replace item with str
I know I can do list.remove(item), but how do I place str back into that exact location?
Is this how / best way?
if item in list:
loc = list.index(item)
list.remove(item)
list.insert(loc, str)
Thanks.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor