为什么不会呢?
import string;help(string.title)
看起来能够工作但是
help(string.strip)
运行正常吗?
我遇到了错误
最近的调用(最近的代码):
文件"", 行1, in AttributeError: 'module'对象没有 属性'title'
string
是一个模块。 - ghostdog74str
是字符串字面值的类型。 - Ignacio Vazquez-Abrams