测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 421 字符 |
模型生成的代码 (421 字符)
def remove_length(s, k):
"""
Remove all words of length k from the given string.
Args:
s (str): Input string containing words separated by whitespace.
k (int): Length of the words to be removed.
Returns:
str: A new string with all words of length k removed,
words separated by a single space.
"""
return ' '.join(word for word in s.split() if len(word) != k)
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试