Bytes Methods
bytes.title()
Uppercase the first ASCII letter in each consecutive run of ASCII letters and lowercase subsequent letters in that run. Digits, punctuation and non-ASCII bytes break runs. This simple rule does not understand human names or words in other languages. The original bytes remain unchanged; do not depend on the result having a different identity. These operations are intended for ASCII-compatible data, not arbitrary binary formats.
Formal Syntax & Structure
python syntaxpython
data.title()Return Value
bytes
bytes containing the transformed byte values; receiver unchanged.
Working Example
Example Snippetpython
data = bytes(b'api READY')result = data.title()print(result)print(bytes(b"o'NEIL").title())print(data)