bytes.partition()

bytes.partition(sep) bytearray.partition(sep)

Split the sequence at the first occurrence of sep, and return a 3-tuple containing the part before the separator, the separator, and the part after the separator. If the separator is not found, return a 3-tuple containing a copy of the original sequence, followed by two empty bytes or bytearray objects.

The separator to search for may be any bytes-like object.

doc_python
2016-10-07 17:28:04
Comments
Leave a Comment

Please login to continue.