def _swapchar(s, ind, newch):
    """
    Helper function to make chars in a string mutableish
    """
    if 0 < ind >= len(s):
        raise IndexError('index out of range')
    return s[:ind] + newch + s[ind + 1:]
