PythonfromPythonmorsels4 days agoWhy splitlines() instead of split("\n")?Use str.splitlines() instead of splitting on '\n' because splitlines handles multiple newline conventions (LF, CRLF) and avoids leftover carriage returns.