How to append to bytes in python 3 March 10, 2023 by Tarik bytes is immutable. Use bytearray. xs = bytearray(b'\x01\x02\x03') xs.append(5)