PyDocs

Nav

Python Runtime Services

bytes.strip

builtins

method of bytes
  • bytes.strip(bytes=None, /)
Strip leading and trailing bytes contained in the argument.

If the argument is omitted or None, strip leading and trailing ASCII
whitespace.
1 Example
>>> b'   spacious   '.strip()
b'spacious'
>>> b'www.example.com'.strip(b'cmowz.')
b'example'
from the Python docs
See Also
No see-alsos for builtins/bytes.strip
0 Notes
No notes for bytes.strip