python里的r?
例如:
test = """hello,\nworld""" print "this is test1: %s" %test print "this is test2: %r" %test输出: this is test1: hello, world this is test2: 'hello,\nworld'由此可见,在python中格式化字符%r,表示打印的是对象,什么都打印Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有