当前位置:主页 > 软件编程 > Python代码 >

python代码过长的换行方法

时间:2021-03-07 10:29:37 | 栏目:Python代码 | 点击:

python代码换行就是每行后面加个 \

举个栗子:

time = "2017"
print "one" + "," \
+ "two" \
+ ",three" + \
"," + time

打印出来就是:

one,two,three,2017

再举一个栗子:

print "this line is toooooooooooo \
long"

打印出来:

this line is toooooooooooo long

您可能感兴趣的文章:

相关文章