i have a byte string and need to transform it to an ascii string due to legacy code reasons.
here is the code:
Code: Select all
MicroPython v1.8.4 on 2016-09-09; PYBv1.1 with STM32F405RG
Type "help()" for more information.
>>> x = b'\xf7\x03\x14\x04\x00\x01'
>>> x.decode('ascii')
'\x07\x03\x14\x04\x00\x01'
Thanks for help!
best regards,
Oli