Mbpp/297

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度469 字符
模型生成的代码 (469 字符)
def flatten_list(nested_list):
    """
    Recursively flattens a nested list structure.

    Args:
        nested_list (list): A list possibly containing nested lists.

    Returns:
        list: A flat list containing all the non-list elements in the original nested structure.
    """
    flat = []
    for item in nested_list:
        if isinstance(item, list):
            flat.extend(flatten_list(item))
        else:
            flat.append(item)
    return flat
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试