一.字符串类型(str) class str(basestring): """ str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object. """ def capitalize(self): ""&q
字符串是有序的,不可变的. 下面的例子说明了字符串是不可变的 name = 'alex' name = 'Jack' """ 并没有变,只是给name开启了一块新内存,储存Jack In [9]: name = 'alex' In [10]: id(name) Out[10]: 4501642800 In [11]: name = 'Rain' In [12]: id(name) Out[12]: 4501820168 原来的被python给清理了 ""&
Python3内置函数 https://www.runoob.com/python3/python3-built-in-functions.html int https://www.runoob.com/python3/python3-number.html str https://www.runoob.com/python3/python3-string.html list https://www.runoob.com/python3/python3-list.html tuple https