Mobo01 Posted June 17, 2022 Posted June 17, 2022 I'm currently studying Python and wanted to try all of the escape sequences, however my code appears to have a fault. Could you please assist me in locating it? My Code: string = """backslash - \\\nsingle quote - \'\ndouble quote - \" ASCII bell - \a Lorem ASCII backspace - \b Lorem ACII formfeed - \f Lorem Unicode - \N{prabhu} Ipsum Carriage return - \r Ipsum 16 bit Hex value - \u1234 32 bit Hex value - \U12345678 ASCII Vertical tab - \v Octal value character - \123 Hex value - \x12 """ print(string) Output: Error: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 137-146: unknown unicode character name
Dan C Posted June 17, 2022 Posted June 17, 2022 Hi @Mobo01, Welcome to the Affinity Forums These forums are for technical support, bug reporting, work/resource sharing and discussions relating to the Affinity apps - and are not the place for other questions regarding Python. I would recommend a more generic site for this, such as Stack Overflow. I have locked this thread to prevent further replies, and we ask that you do not continue to make such posts here on the Affinity Forums. Many thanks for your understanding!
Recommended Posts