
对于python常用转义符的一个总结。
在行尾时作为续行符
1 |
print("This how '' appear in the end of a line |
1 |
This how '' appear in the end of a line happens |
1 |
print("\") |
1 |
|
1 |
print('I'm very happy') |
1 |
I'm very happy |
1 |
print("I"m very happy") |
1 |
I"m very happy |
1 |
print("This is how it works a") |
1 |
This is how it works |
1 |
print("This is how it worksb") # 将前面的替换为空格 |
1 |
This is how it works |
1 |
print("Hellonworld!") |
1 |
Hello |
1 |
print("Hellorworld!") |
1 |
world! |
v纵向制表符
1 |
print("vHello, world!") |
1 |
Hello, world! |
1 |
print("tHello, world!") |
1 |
Hello, world! |




近期评论