Python bytearray() built-in function

From the Python 3 documentation

Return a new array of bytes. The bytearray class is a mutable sequence of integers in the range [...]. It has most of the usual methods of mutable sequences, described in Mutable Sequence Types, as well as most methods that the bytes type has [...].

Examples

>>> bytearray([1, 2, 3])
# bytearray(b'\x01\x02\x03')

Ups! Nothing here yet!

This is a great opportunity for you to collaborate! Hit the link at the end of this page and add some examples and a brief description. If you don't know where to start, the Python 3 documentation will lead you in the right direction.

Subscribe to pythoncheatsheet.org

A two times a month and bullshit free publication, full of interesting, relevant links.