Escape characters in strings (the most detailed version in history)

Introduction of commonly used escape characters

In Python, (/) is a forward slash, (\) is a backslash, and the backslash is a special character in a string.
(1) Line break (\ n), as the name implies, is used for line breaks.
Python script file input:

print('-----------------------------------------------------------------')
print('名称:扒点刚货\n微信号:BaDianGangHuo\n订阅号简介:阿刚阿刚,无限希望') 
print('-----------------------------------------------------------------')
print('名称:扒点刚货\o12微信号:BaDianGangHuo\o12订阅号简介:阿刚阿刚,无限希望'

Guess you like

Origin blog.csdn.net/aGang_Gg/article/details/105546744