How to read a long multiline string line by line in python
python
Solution
What about using `.splitlines()`?
for line in textData.splitlines():
print(line)
lineResult = libLAPFF.parseLine(line)
Problem
I have a wallop of a string with many lines. How do I read the lines one by one with a `for` clause? Here is what I am trying to do and I get an error on the textData var referenced in the `for line in textData` line. ``` for line in textData print line lineResult = libLAPFF.parseLine(line) ``` The textData variable does exist, I print it before going down, but I think that the pre-compiler is kicking up the error.