def build_list(context, builder, list_type, items):
    nitems = len(items)
    inst = ListInstance.allocate(context, builder, list_type, nitems)
    # Populate list
    inst.size = context.get_constant(types.intp, nitems)
    for i, val in enumerate(items):
        inst.setitem(context.get_constant(types.intp, i), val)

    return impl_ret_new_ref(context, builder, list_type, inst.value)
Build a list of the given type, containing the given items.
dataset/ETHPy150Open numba/numba/numba/targets/listobj.py/build_list