is byte array an object?
The bytearray() method returns a bytearray object which is an array of the given bytes. The bytearray() method returns a bytearray object which is a mutable (can be modified) sequence of integers in the range 0 <=x < 256. If you want the immutable version, use bytes() method.