Let's say I have two bytearray,
b = bytearray(b'aaaaaa')
b1 = bytearray(b'bbbbbb')
file_out = open('bytes.bin', 'ab')
file_out.write(b)
file_out.write(b1)
this code will create a .bin file which contains two bytearrays
how to read this file and store those two variables also decode them back to string?
my goal is to transfer these bytes for other programs to read by making a file. I'm not sure if this bytearray + appending is a good idea.
Thanks