测试评估
| 指标 | 结果 |
|---|---|
| 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 失败测试用例
- 无失败测试