I would assume that you, or the original creator of this data file were on a Mac. Seems you are expecting it to be a simple '\n' line ending, but suffer from the originating editors system default line ending (most likely).
An easy fix, is to call open(...)
with the rU
option like so:
the_txt_file = open('/txt_file', 'rU')
This ensures that the file is opened read only, and uses Universal newline support when reading the particular file.
Good luck!