i gets assign the values of the list one by one, but this won't persist. change you make to
i will be discarded in the next run of the loop since the next value in the list has to be assigned to it.
you could use
range() which if done correctly, could provide you with the indexes to manipulate the
replace() will simply replace all instances it can find. This allows for a one line solution. But then it is a bit of boring to use use a built in function like that to solve the problem
If you need more help, post an updated version of your code + question