How to reference values using hex in strings

In a python string \x can be used to reference characters by their hex value.

For example:

'\x0D' == '\r' # 0D is the hex value of the carriage return