[Python] [tips] [No. 2] Python string cross-row connection, or split into multiple rows for display, pythonno.2
1. Preface
It is a large string that is directly connected to a small string in a long format.
So we split it into multiple lines, that is, aesthetic, and easy to modify.
For example, the wildcard character in the file selection box:
Wildcard = "Python source code file (*. py) | *. py | Python compiling file (*. pyc) | *. pyc | text file (*. txt) | *. txt table file (*. xlsx) | *. xlsxEgg file (*. egg) | *. egg | All files (*. *) | *. *"
The viewing and modification are inconvenient.
2. Method 1: Use a line break
In addition to the last line of strings, add \ To the end to continue the line.
PS. If you are not clear about the meaning of the character string prefix with a letter, go to [1] in [tips] of this blog.
2. Write in the () Expression
This method looks better and feels good to use ~~
3. Postscript
Reprinted please indicate the source (● 'authorization' ●): http://www.cnblogs.com/Twobox/
14:52:30