PyDocs

Nav

Python Runtime Services

bytearray.split

  • bytearray.split(sep=None, maxsplit=-1)
Return a list of the sections in the bytearray, using sep as the delimiter.

sep
  The delimiter according which to split the bytearray.
  None (the default value) means split on ASCII whitespace
  characters (space, tab, return, newline, formfeed, vertical tab).
maxsplit
  Maximum number of splits to do.
  -1 (the default value) means no limit.
1 Example
>>> b'1,2,3'.split(b',')
[b'1', b'2', b'3']
>>> b'1,2,3'.split(b',', maxsplit=1)
[b'1', b'2,3']
>>> b'1,2,,3,'.split(b',')
[b'1', b'2', b'', b'3', b'']
>>> b'1<>2<>3<4'.split(b'<>')
[b'1', b'2', b'3<4']
from the Python docs
See Also
No see-alsos for builtins/bytearray.split
0 Notes
No notes for bytearray.split