#crlf

[ follow ]
Python
fromPythonmorsels
4 days ago

Why 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.
[ Load more ]