Home >Backend Development >Python Tutorial >How to start a new line in python?
There are three methods, namely: 1. Enter three single quotation marks (''') where a new line needs to be started; 2. Enter three double quotation marks ("" where a new line needs to be started) "); 3. Enter a backslash (\) where you need to start a new line.
Three ways to wrap a string in Python:
#The first type: three single quotes
print ''' I am a programmer
I just started learning python'''
#Second type: three double quotes
print """ I am a programmer
I just started learning python"""
#Third Type:\End
print "I am a programmer,\
I just started learning python"
Recommended tutorial: "python 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!