Home > Article > Backend Development > What should I do if python's carriage return cannot be a line feed but is executed?
The solution to the problem that python's carriage return cannot be a line break but is executed: first open the code input; then change the single or double quotes to triple quotes to run, or add the escape character [\] to the code.
The solution to the problem that python carriage return cannot wrap:
The first automatic line wrap,
We can operate as we usually do when typing
But this operation will cause errors
You can try to enter the order at this time Change the quotation marks or double quotation marks into triple quotation marks
I found that it can be run this time
In addition to the above method, we can also use escape Symbol\
For this symbol we can look at this chart
Use \n on the chart to achieve line breaks , but it should be noted that you can use single quotes and triple quotes, but there will be a grammatical error when using double quotes
##Related free learning recommendations :python video tutorial
The above is the detailed content of What should I do if python's carriage return cannot be a line feed but is executed?. For more information, please follow other related articles on the PHP Chinese website!