python print special characters code example
Example 1: python print show special characters
a = "Hello\tWorld\nHello World"
print(repr(a))
# 'Hello\tWorld\nHello World'
Example 2: python carriage return
## In Python, you can put a carriage return into a string using '\r'.
## This is basically just a newline, and usually you would just use
## '\n'.