PyDocs

Nav

Python Runtime Services

bytearray.splitlines

  • bytearray.splitlines(keepends=False)
Return a list of the lines in the bytearray, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends
is given and true.
1 Example
>>> b'ab c\n\nde fg\rkl\r\n'.splitlines()
[b'ab c', b'', b'de fg', b'kl']
>>> b'ab c\n\nde fg\rkl\r\n'.splitlines(keepends=True)
[b'ab c\n', b'\n', b'de fg\r', b'kl\r\n']
from the Python docs
See Also
No see-alsos for builtins/bytearray.splitlines
0 Notes
No notes for bytearray.splitlines