当前位置:首页 > Python教程 > python技巧

python中的三引号

在python中,三引号支持字符串跨多行、包含换行符号、制表符号、以及其它特殊字符

>>> hi = ‘‘‘
... this 
... is a 
... test
... ‘‘‘
>>> print hi

this 
is a 
test

>>> hi
‘nthis nis a ntestn‘
>>> 

 

原文:http://www.cnblogs.com/abclife/p/5238209.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!