print "this is 1 '"
print 'this is 2 "'
print ('''
hello,everyone!
hello,everyone!!
hello,everyone!!!
"hello,everyone!!!!"
'hello,everyone!!!!!'
''')
转载于:https://blog.51cto.com/suxin/1873931
本文通过几个具体的例子展示了如何在Python中使用不同的字符串格式进行打印输出。这些示例包括了基本的字符串打印、使用单引号及双引号混合打印等技巧。
print "this is 1 '"
print 'this is 2 "'
print ('''
hello,everyone!
hello,everyone!!
hello,everyone!!!
"hello,everyone!!!!"
'hello,everyone!!!!!'
''')
转载于:https://blog.51cto.com/suxin/1873931
2903

被折叠的 条评论
为什么被折叠?