[lang-ref] ( drop_last_n ) ( python )

def test_drop_last_n():
    # text[:-n]
    text = '0123456789'
    n = 3
    part = text[:-n]
    assert part == '0123456'