Can you help me with this line of python code? I am trying to add strings to an array, and exclude the newlines. While the code appears to work the first time it splits the string, it seems to think there's another newline in there since it returns an error message:
substring not found
for i in x:
Traceback (most recent call last):
File "<pyshell#5>", line 3, in <module>
ValueError: substring not found
Why don't you use "replace" command?