Discuss / Python / 怎么可以让print里的内容换行?

怎么可以让print里的内容换行?

Topic source

心中熱望

#1 Created at ... [Delete] [Delete and Lock User]

n = 123

f = 456.789

s1 = 'Hello, world'

s2 = 'Hello, \'Adam\''

s3 = r'Hello, "Bart"'

s4 = r'''Hello,

Lisa!'''

print(n,f,s1,s2,s3,s4)

print('n = 123','\nf = 456.789',"\ns1 = 'hello,world'" ,"\ns2 = 'hello,\\'Adam\\''","\ns3 = r'Hello, \"Bart\"'","\ns4 = r\'''hello,\nlias!\'''")  这是我认为的。


  • 1

Reply