首页后端开发Pythonpython里的r

python里的r

时间2023-06-03 08:48:02发布访客分类Python浏览799
导读:python里的r?例如:test = """hello,\nworld""" print "this is test1: %s" %test print "this is test2: %r" %test输出: this is test1...

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,表示打印的是对象,什么都打印

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: python里的r
本文地址: https://pptw.com/jishu/59423.html
安装python39支持win7吗 string是python的关键字吗

游客 回复需填写必要信息