Possible Duplicate:
get nth line of string in python
Is there a way to get a specified line from a multiline string in Python? For example:
>>> someString = 'Hello\nthere\npeople\nof\nEarth'
>>> aNewString = someString.line(1)
>>> print aNewString
there
I’d like to make a simple “interpreter” style script, looping through every line of the file it’s fed.
1 Answer