python代码过长的换行方法

作者:codechelle 时间:2022-12-25 07:19:59 

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

举个栗子:


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

打印出来就是:


one,two,three,2017

再举一个栗子:


print "this line is toooooooooooo \
long"

打印出来:


this line is toooooooooooo long

来源:https://blog.csdn.net/codechelle/article/details/61199212

标签:python,代码,换行
0
投稿

猜你喜欢

  • 如何在 IE 中使用 HTML5 元素

    2009-06-14 19:44:00
  • asp使用 sql_dmo 添加新数据库代码

    2010-03-17 20:57:00
  • python爬虫 正则表达式使用技巧及爬取个人博客的实例讲解

    2023-11-06 02:16:54
  • JS:firefox 兼容性问题

    2009-08-01 16:20:00
  • python 读写、创建 文件的方法(必看)

    2023-08-07 11:37:40
  • Python用list或dict字段模式读取文件的方法

    2022-07-16 18:29:07
  • 学习ASP和编程的28个观点

    2008-06-27 12:57:00
  • 使用tensorflow实现AlexNet

    2023-08-10 08:29:30
  • 多维度导航探秘II

    2010-08-17 21:24:00
  • 采用XMLHTTP编写一个天气预报的程序

    2007-10-15 12:35:00
  • PHP中重启php-fpm的几种方法汇总

    2023-06-12 21:05:24
  • python实现百度关键词排名查询

    2023-01-19 12:26:58
  • block 和 inline 答案揭晓~ 另付一则,关于 word-break

    2009-12-08 13:06:00
  • Python3中的f-Strings增强版字符串格式化方法

    2022-07-07 12:34:36
  • Javascript中数组方法汇总(推荐)

    2023-07-16 08:33:02
  • 在Linux下安装Oracle

    2010-07-30 12:46:00
  • Tensorflow分类器项目自定义数据读入的实现

    2023-06-21 20:21:53
  • Postman 使用指南及小技巧

    2023-06-23 22:28:38
  • Python中的对象,方法,类,实例,函数用法分析

    2022-12-13 22:01:38
  • 在Oracle 8x实现自动断开后再连接

    2010-07-26 13:03:00
  • asp之家 网络编程 m.aspxhome.com