Mbpp/766

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度398 字符
模型生成的代码 (398 字符)
def pair_wise(lst):
    """
    Return a list of all pairs of consecutive items in the given list.
    
    Args:
        lst (list): Input list of any length.
    
    Returns:
        list: A list of tuples, each containing two consecutive elements from lst.
              If lst has fewer than 2 elements, returns an empty list.
    """
    return [(lst[i], lst[i+1]) for i in range(len(lst)-1)]
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试