I have a string, for example :
s = '000025'
now I want to replace s[:2]
with some string ('ss')
- I tried simple assignment (
s[:2] = 'ss'
) but it didn't work - replace method didn't work either
s.replace('00', 'ss', 1)
works but I'm looking for another solution
how can I do it ?