I am using webpage to get data in hex to write serial modbus using python
Issue is that 0A
in the string gets converted to \n
.
How to stop this from happening?
rList = r'0106000600000AE9CC'
arr=str(rList)
arr = bytes.fromhex(rList)
print(arr)
Output:
b'\x01\x06\x00\x06\x00\x00\n\xe9\xcc'