测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 395 字符 |
模型生成的代码 (395 字符)
def list_split(lst, n):
"""
Splits a list into n sublists by taking every nth element.
Args:
lst (list): The input list.
n (int): The step size for grouping.
Returns:
list: A list of n sublists, where sublist i contains elements
at indices i, i+n, i+2n, ... from the original list.
"""
return [lst[i::n] for i in range(n)]
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试