How to wrap lines when writing in python

silencement
Release: 2019-05-22 13:52:33
Original
46803 people have browsed it

The code in Python is usually written in one line, but if you can’t finish writing in one line, how can you continue writing in a new line?

How to wrap lines when writing in python

Code line breaks in python are divided into two situations

1. Direct line breaks in the code: spaces\

How to wrap lines when writing in python

2. Add brackets, () {} [] do not need to add special line breaks

How to wrap lines when writing in python

#3. There is also a new line break in a string that is similar to code line break. You must use triple quotes to achieve this purpose (single/double can be used) , this method can output the newline character in the string without string concatenation \n.

How to wrap lines when writing in python

The above is the detailed content of How to wrap lines when writing in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!