two cautions here too firstpython allows special characters to be coded with both hex and unicode escapes in str stringsbut only with hex escapes in bytes strings --unicode escape sequences are silently taken verbatim in bytes literalsnot as escapes in factbytes must be decoded to str strings to print their non-ascii characters properlys ' \xc \xe cs 'aabecs ' \ \ cs 'aabec xstr recognizes hex and unicode escapes ' \xc \xe cb ' \xc \xe cb ' \ \ cb ' \\ \\ cbytes recognizes hex but not unicode ' \xc \xe cb ' \xc \xe cprint(bb' \xc \xe cb decode('latin- ''aabecuse hex escapes for bytes prints non-ascii as hex escape sequences taken literallydecode as latin- to interpret as text secondbytes literals require characters either to be ascii characters orif their values are greater than to be escapedstr stingson the other handallow literals containing any character in the source character set--whichas discussed laterdefaults to utf- unless an encoding declaration is given in the source files 'aabecs 'aabecchars from utf- if no encoding declaration 'aabecsyntaxerrorbytes can only contain ascii literal characters ' \xc \xe cb ' \xc \xe cb decode('latin- ''aabecchars must be asciior escapes encode( ' \xc \ \xc \xa cs encode('utf- ' ' \xc \ \xc \xa csource code encoded per utf- by default uses system default to encodeunless passed coding unicode strings