Discuss / Python / .

n1=255

n2=1000

print('255 = %s' '\n' '1000 = %s' % (hex(n1),format(n2,'#x')))

为什么这里\n要带上单引号?

馒咕噜

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

换行

哎呀博雅

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

n1=255

n2=1000

print('255 = %s\n1000 = %s' % (hex(n1),format(n2,'#x')))

换行也不需要中间的引号啊~~~~


  • 1

Reply