首页
技术
登录
6mi
u
盘
搜
搜 索
技术
Python中实现分行打印的两种方式
Python中实现分行打印的两种方式
技术
2022-07-11
92
1、使用转义字符\n
print
(
'jan\nfeb\nmar'
)
jan feb mar
print
(
'this is a test%s'
%
'\nhappy\nbirthday'
)
this is a test happy birthday 2、三重引号
print
(
"""i like watching tv. do you like it too? """
)
i like watching tv. do you like it too?
转载请注明原文地址:https://ipadbbs.8miu.com/read-11944.html
最新回复
(
0
)