the function :
f = open('image.txt', 'wb')
byte_arr = getbytes(read_bits())
byte_list = list(byte_arr)
print(byte_list)
some_bytes = bytearray(byte_list)
print(bytes(some_bytes))
st = bytes(some_bytes).decode('latin1')
immutable_bytes = bytes(some_bytes)
with open('test','wb') as f:
f.write(immutable_bytes )
the output is like :
b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00'
what I want is to write string value converted from this list of byte values