Cheap VPS host selection
Provide server host evaluation information

How to put three quotation marks in python How to enter three quotation marks in python

Three quotation marks, three single quotation marks and three double quotation marks in Python are not often used, but they are very useful in strings with special formats. Usually we use single quotation marks or double quotation marks to define a character.

When writing strings, you can only write the strings together as one line. If it must be written in multiple lines, a must be added after each line to indicate a hyphen, for example:

 str1 =  "List of name:\ Hua Li\ Chao Deng"

And even if you write like this, you can't get the expected output:

 List of name : Hua Li Chao Deng

In fact, the output is as follows:

 >> > str1 =  "List of name:\ ...          Hua Li\ ...          Chao Deng"
 >> >  print ( str1 )
 List of name : Hua Li        Chao Deng

The above is the method of entering three quotation marks in python.

Do not reprint without permission: Cheap VPS evaluation » How to put three quotation marks in python How to enter three quotation marks in python