text with broken line and dash:
to validate my solution was
I need to take the bench test
of the elaborated algorithm
only after the table test that
the program was implemen-
ted this strategy spared
development time
code:
def file_string():
with open('speech.txt','r') as file:
lines = file.read().split("\n")
string = []
for line in lines:
line = line.replace('-\n','')
string.append(line)
return (' '.join(string))
print(file_string())
Correct output:
to validate my solution was I need to take the bench test of the elaborated algorithm only after the table test that the program was implemented this strategy spared development time
Exit from my code:
to validate my solution was I need to take the bench test of the elaborated algorithm only after the table test that the program was implemen- ted this strategy spared development time
The text was written in the text editor.
I need this help.
applying the code sujerido the exit remained:
to validate my solution was I need to take the bench test of the elaborated algorithm only after the table test that the program was implemen ted this strategy spared development time
only happens when I read the file written in a text editor, I need to create a list with these words to make a comparison.