' \xc \ \xc \xa cencode per utf- multibyte non-ascii characters can be coded with hex or unicode escapes in string literals in xjust as in howeveras with bytes in xthe "\ and "\ escapes are recognized only for unicode strings in xnot -bit str strings--againthese are used to give the values of decoded unicode ordinal integerswhich don' make sense in raw byte stringc:\codec:\python \python ' \xc \xe cu ' \xc \xe cprint aabec hex escapes for non-ascii ' \ \ cu ' \xc \xe cprint aabec unicode escapes for non-ascii ' bitsu' bits ' \xc \xe cs ' \xc \xe cprint -bphc print decode('latin- 'aabec hex escapes work ' \ \ cs ' \\ \\ cprint \ \ len( not unicode escapestaken literallybut some may print oddlyunless decoded mixing string types in like ' str and bytes ' unicode and str share nearly identical operation setsso unless you need to convert to other encodings you can often treat unicode as though it were str one of the primary differences between and xthoughis that uni code and non-unicode str objects can be freely mixed in expressions--as long as the str is compatible with the unicode objectpython will automatically convert it up to unicodeu'ab'cdu'abcdcan mix if compatible in but 'abb'cdnot allowed in howeverthis liberal approach to mixing string types in works only if the -bit string happens to contain only -bit (asciibytes unicode and byte strings