python fundamentals
python fundamentals
Multiline Strings - You can assign a multiline string to a variable by using three
quotes:
Example:
You can use three double quotes Or three single quotes
Note: in the result, the line breaks are inserted at the same position as in the code.
String literals
For multi-line string with triple quote, while calculating the size, the EOL(End Of Line) is also
counted.
Example:
a=”””Xy
z”””
has size 4.
For multi-line string with single quote and backslash character at the end of line, while calculating
the size, backslash is not counted.
Example:
a=”c\
d\
e”
has size 3
Escape Characters