str字符串
str
转义字符
格式化
内建函数
字符串
表示文字信息
用单引号,双引号,三引号引起来
s = 'i love wangxiaojing'
print(s)
i love wangxiaojing
s ="i ch liebe wangxiaojing "
print(s)
i ch liebe...
str字符串
str
转义字符
格式化
内建函数
字符串
表示文字信息
用单引号,双引号,三引号引起来
s = 'i love wangxiaojing'
print(s)
i love wangxiaojing
s ="i ch liebe wangxiaojing "
print(s)
i ch liebe...
看下面的例子就明白了
class Test(object):
def __init__(self, value='hello, world!'):
self.data = value
>>> t = Test()
>>> t
<__main__.Test at 0x7fa91c307190>
>>...
英文文档:
class str(object='') class
str(object=b'', encoding='utf-8', errors='strict')
Return a string version of object. If object is not provided, returns the empty string. Otherwise, the beha...