python之字符串

一、字符串的声明有三种方式:单引号、双引号和三引号(包括三个单引号或三个双引号)。例如:>>> str1 = 'hello world' >>> str2 = "hello world" >>> str3 = '''hello world''' >>> str4 = """hello world""" >>> print str1  hello world  >>> print str2  hel
相关文章
相关标签/搜索