[lang-ref] ( list_foreach_with_index ) ( python )

def test_list_foreach_with_index():
    # for i, v in enumerate(items)
    items = ['A', 'B', 'C', 'D', 'E']

    r = ''
    for i, item in enumerate(items):
        r += f'{i}{item},'

    assert r == '0A,1B,2C,3D,4E,'