I've got a data file where each "row" is delimited by \n\n\n
. My solution is to isolate those rows by first slurping the file, and then splitting rows:
for row in slurped_file.split('\n\n\n'):
...
Is there an "awk
-like" approach I could take to parse the file as a stream within Python 2.7.9 , and split lines according to a given string value ? Thanks.