Home > Backend Development > Python Tutorial > How to start a new line in python

How to start a new line in python

coldplay.xixi
Release: 2020-08-11 13:48:05
Original
11978 people have browsed it

How to start a new line in python: 1. Use three single quotes to wrap the line; 2. Use three double quotes to wrap the line; 3. Use the end of [\] to wrap the line.

How to start a new line in python

How to start a new line in python:

First method: three single quotes

print ''' 我是一个程序员
我刚开始学习python'''
Copy after login

The second type: three double quotes

print """ 我是一个程序员
我刚开始学习python"""
Copy after login

The third type: ending with \

print "我是一个程序员,\
我刚开始学python"
Copy after login

Related learning recommendations: python video tutorial

The above is the detailed content of How to start a new line in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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