[lang-ref] ( index_of_string ) ( python )

def test_index_of_string():
    # find, index
    text = 'abcdefghi abcdefghi'
    s    = 'def'
    assert text.find(s) == 3
    assert text.index(s) == 3