In Python, strings are immutable.
What is the standard idiom to walk through a string character-by-character and modify it?
The only methods I can think of a
def modifyIdx(s, idx, newchar): return s[:idx] + newchar + s[idx+1:]