It is important you master all the tricks you can apply to them. This is why string manipulation is tested in coding interviews.
We will evaluate Python functions and methods that allow you to manipulate strings.
Escape Characters
These are characters in Python represented with backslash (\).
Backslash n also expressed as (\n) represents a new line.
Backslash t also represented as (\t) represents tab, backslash backslash (\\) is the actual backslash character in strings.
Example:
We have the variable âwordsâ and it contains the string, âLet us master Python stringsâ. We want stings to fall into a new line and we will use (\n) to tell the interpreter to take strings to a line of its own.