[lang-ref] ( replace_range ) ( python )

def test_replace_range_alternative():
    # text[:m] + text + text[n+1:]
    text = 'abcde'

    m = 2
    n = 3
    text = text[:1] + 'BC' + text[3:]

    assert text == 'aBCde'