Computer Applications

How are nongraphic characters represented in Python ?

Python Funda

2 Likes

Answer

Python allows us to have certain non-graphic characters in String values. These non-graphic characters can be represented by using escape sequences — represented by a backslash ( \ ) followed by one or more characters.

Some examples of non-graphic characters and their escape sequences are as follows:

Escape SequenceNon-Graphic Character
\aASCII Bell (BEL)
\nNew line character
\tHorizontal tab

Answered By

1 Like


Related Questions