I am wondering how is binary encoding for a string is given in Python.
For example,
>>> b'\x25'
b'%'
or
>>>b'\xe2\x82\xac'.decode()
'€'
but
>>> b'\xy9'
File "<stdin>", line 1
SyntaxError: (value error) invalid \x escape at position 0
Please, could you explain what \xe2 stand for and how this binary encoding works.