Python · Class
bytearray
bytearray() creates a mutable sequence of bytes. You can build it from text, a size, a buffer, or an iterable of byte values.
Last updated
Syntax
bytearray(source=b'')
bytearray(source, encoding, errors='strict')In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
bytesmemoryviewstr.encode()Mutable Sequence Types