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