convert int arry to byte array python code example Example: int to byte array python >>> bytes([2]) b'\x02`