python中字符串前面加r的作用,python字符串作用
python中字符串前面加r的作用,python字符串作用
本文实例讲述了python中字符串前面加r的作用。分享给大家供大家参考。具体分析如下:
字符串前面加r,表示的意思是禁止字符串转义
>>> print "asfdas\n" asfdas >>> print "asfdas\\n" asfdas\n >>> print "asfdas\n" asfdas >>> print r"asfdas\n" asfdas\n
希望本文所述对大家的Python程序设计有所帮助。
相关内容
- python避免死锁方法实例分析,python避免实例分析
- python定时器(Timer)用法简单实例,pythontimer
- Python实现处理管道的方法,python实现管道
- python中管道用法入门实例,python管道
- python基于multiprocessing的多进程创建方法,python多进程
- python抽象基类用法实例分析,python抽象实例分析
- python中__call__内置函数用法实例,python__call_
- Python获取系统默认字符编码的方法,python获取字符编码
- python协程用法实例分析,python协实例分析
- python中__slots__用法实例,python__slots_
评论关闭