ZyBooks Autograder Text
代码在ZyBooks
你好,
我有我的代码写出来的输出相同的ZyBooks请求,但是在我的每一个输出,我得到一个缺失/不正确的换行错误在我的评分器。我在这篇文章里附上了一张照片。我不知道这是为什么。
character = input()
list_of_words = input()
new_list_of_words = list_of_words.split()
string = ""
for word in new_list_of_words:
for char in word:
if character == char:
string = string + word + ","
break
print(string)
我尝试将拆分函数更改为new_string = string.split(" ")
以及在if块内播放字符串连接,但是,它都没有解决我的问题。
打印(string.strip(),结束= ")
这对我来说很有效