Python
Python
Python searches for an ending-single quote in the string 'I'm a "Writer" '. Hence, it raises an
error. Below is an example of escape single and double quotes in Python using \’ single quote
and \” in strings in Python.
Example:
▪ Escape sequence for space \t: The “\t” character is used to get space between the words.
Example:
Here, we can see the space between the word Python and Programming.
▪ Escape sequence backspace \b: Using “\b” removes the space between the words in
Python.
Example:
FORMATTING STRINGS
String formatting in Python allows us to create dynamic strings by combining variables and
values.
▪ Formatting string using % Operator: The modulo % is also known as the “string-
formatting operator”.
Output:
Misha walked and looked around.