#crlf

[ follow ]
Python
fromPythonmorsels
2 weeks 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 ]