[lang-ref] ( map_with_comprehension ) ( python )

def test_map_with_comprehension():
    # [x for x in items]
    items = [1, 2, 3]

    r = [x * 2 for x in items]

    assert r == [2, 4, 6]