outside the -bit range of asciibut we can embed them in str objects because str supports unicodechr( xc 'achr( xe ' xc xe characters outside ascii' range '\xc \xe 'aesingle -bit value hex escapestwo digits '\ \ 'aelen( -bit unicode escapesfour digits each two characters long (not number of bytes!note that in unicode text string literals like thesehex and unicode escapes denote unicode code point valuenot byte values the hex escapes require exactly two digits (for -bit code point values)and and unicode escapes require exactly four and eight hexadecimal digitsrespectivelyfor denoting code point values that can be as big as and bits will allows '\ \ 'ae -bit unicode escapeseight digits each as shown laterpython works similarly in this regardbut unicode escapes are allowed only in its unicode literal form they work in normal string literals in here simply because its normal strings are always unicode encoding and decoding non-ascii text nowif we try to encode the prior section' non-ascii text string into raw bytes using as asciiwe'll get an errorbecause its characters are outside ascii' -bit code point value ranges '\ \ 'aelen( non-ascii text stringtwo characters long encode('ascii'unicodeencodeerror'asciicodec can' encode characters in position - ordinal not in range( encoding this as latin- worksthoughbecause each character falls into that encoding' -bit rangeand we get byte per character allocated in the encoded byte string encoding as utf- also worksthis encoding supports wide range of unicode code unicode and byte strings