io - Python readlines not separating lines -
i have xml file page shows correctly on text editor once use readlines(), 1 line. assume means line separator being used isn't recognized python gedit.
i want split() on data correctly how can see line separator being used in file?
as pointed out in comments, if it's xml, hand xml parser elementtree or lxml. newlines shouldn't matter in xml.
for information, using open("thefile.xml", "ru") open universal newline support, python recognise \n, \r or \r\n newline markers.
Comments
Post a Comment