Hello,
I have my code written out which outputs identical to what ZyBooks is requesting, however in each of my outputs, I get a missing/incorrect newline error on my grader. I attched a picture to this post. I do not know why this is.
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)
I tried changing the split function to new_string = string.split(" ")
as well as playing around with the string concatenation inside the if block, however, none of it solved my problem.