New submission from Matthias Naegler :
```
# 0x0D, 13 = /r
# 0x0A, 10 = /n
print('test "\\r\\n"')
print('-')
b = bytes([0x41, 0x0D, 0x0A])
print("bytes: %s" % b)
print("string: %s" % b.decode('utf8'), end='')
#
Matthias Naegler added the comment:
Thanks Steven for your fast response.
> The best way to see what your string actually contains is the print the repr:
You are right. bytes.decode is correct.
Im not a python expert, so thanks for the note about "repr". With repr(...)
everythi
Matthias Naegler added the comment:
I forgot something important. Using open with 'ab' works.
>>> ...above code...
with open("./test_binary.txt", "ab") as myfile:
... myfile.write(s.encode('utf-8'))
--
_