in reply to What is backslash and number means in string
Close. It's octal. Base 8. All of these are equivalent:is it hexademical or demical?
"\353" oct("353") chr(3 * 8**2 + 5 * 8**1 + 3 * 8**0)
what is difference between \x<number> and \<number> ?
They're basically the same, except the number is hex in "\x00" and octal in "\000"
and is it unicode codepoint?
Each of the sequences creates a character (a string element). You could use these sequences to create Unicode Code Points, but that's now what they are used for in this case. They are used to create the bytes that form the UTF-8 encoding of some Chinese text.
|
|---|