I want to use the replace function however I only want to replace one character, not all instances of that character.
For example :-
>>> test = "10010"
>>> test = test.replace(test[2],"1")
>>> print test
>>> '11111' #The desired output is '10110'
Is there a way that I can do this?