测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 567 字符 |
模型生成的代码 (567 字符)
def merge(lst):
"""
Takes a list of lists, where each sublist has two elements,
and returns a list of two lists: the first list contains all
the first elements of the sublists, and the second list contains
all the second elements.
Example:
>>> merge([['x', 'y'], ['a', 'b'], ['m', 'n']])
[['x', 'a', 'm'], ['y', 'b', 'n']]
"""
# Use zip to transpose the list of pairs.
# zip(*lst) produces tuples (first elements) and (second elements).
# Convert each tuple to a list.
return [list(column) for column in zip(*lst)]
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试