Python入门-引号

Python 接收单引号(' ),双引号(" ),三引号(''' """) 来表示字符串,引号的开始与结束必须的相同类型的。

其中三引号可以由多行组成,编写多行文本的快捷语法,常用语文档字符串,在文件的特定地点,被当做注释。

1 word = 'word'
2 sentence = "This is a \
3 sentence."
4 paragraph = """This is a paragraph. It is
5 made up of multiple lines and sentences."""
6 print word
7 print sentence 
8 print paragraph
View Code

 

posted @ 2015-10-08 13:21  清水汪汪  阅读(233)  评论(0编辑  收藏  举报