带虚线和短划线的文本: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
代码: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())
正确输出: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
退出我的代码: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
文本是在文本编辑器中编写的。在
我需要这个帮助。在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
只有当我读到用文本编辑器编写的文件时,我需要用这些单词创建一个列表来进行比较。在