[Tutor] String encoding

Alan Gauld alan.gauld at btinternet.com
Thu Aug 25 18:54:01 CEST 2011

On 25/08/11 15:36, Prasad, Ramit wrote:
> I have a string question for Python2. Basically I have two strings with
 > non-ASCII characters and I would like to have a better understanding
 > of what the escapes are from

> ' M\xc9XICO' and ' M\311XICO'

I don't know what they are from but they are both the same value, one in 
hex and one in octal.

0xC9 == 0311

As for the encoding mechanisms I'm afraid I can't help there!

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list