[lang-ref] ( filter_with_lambda ) ( python )

def test_filter_with_lambda():
    # filter(lambda ..)
    items = [1, 2, 3, 4, 5, 6]

    r = list(filter(lambda x: x % 2 == 0, items))

    assert r == [2, 4, 6]