stress python unicode support in this because it' new but now that 've shown you the basics of unicode strings in xi need to explain more fully how you can do much the same in xthough the tools differ unicode is available in python xbut is distinct type from strsupports most of the same operationsand allows mixing of normal and unicode strings when the str is all ascii in factyou can essentially pretend ' str is ' bytes when it comes to decoding raw bytes into unicode stringas long as it' in the proper form here is in actionunicode characters display in hex in unless you explicitly printand non-ascii displays can vary per shell (most of this section ran outside idlewhich sometimes detects and prints latin- characters in encoded byte strings--see ahead for more on pythonioencoding and windows command prompt display issues) :\codec:\python \python ' \xc \xe cs ' \xc \xe cprint -bphc decode('latin ' ' \xc \xe cprint aabec string of -bit bytes text encoded per latin- some non-ascii nonprintable characters (idle may differdecode bytes to unicode text per latin- decode('utf- 'encoded form not compatible with utf- unicodedecodeerror'utf codec can' decode byte xc in position invalid ontinuation byte decode('ascii'encoded bytes are also outside ascii range unicodedecodeerror'asciicodec can' decode byte xc in position ordinal not in range( to code unicode textmake unicode object with the 'xxxliteral form (as mentionedthis literal is available again in but superfluous in in generalsince its normal strings support unicode) ' \xc \xe cu ' \xc \xe cprint aabec make unicode stringhex escapes once you've created ityou can convert unicode text to different raw byte encodingssimilar to encoding str objects into bytes objects in xu encode('latin- '' \xc \xe cencode per latin- -bit bytes coding unicode strings