I am trying to .split() a hex string i.e. '\xff\x00' to get a list i.e. ['ff', '00']
This works if I split on a raw string literal i.e. r'\xff\x00' using .split('\\x') but not if I split on a hex string stored in a variable or returned from a function (which I presume is not a raw string)
How do I convert or at least 'cast' a stored/returned string as a raw string?