python中报错Traceback (most recent call last): File “<stdin>“, line 1, in <module>TypeError: ‘str‘ obj
>>>len='hello'>>>len('hello')如果运行该代码则会报错:Traceback(mostrecentcalllast):File"",line1,inTypeError:'str'objectisnotcallable出现该错误的原因是在python中有len()该函数,但是由于我们不小心定义了该函数,则会覆盖原来的len函数,此时不论我们怎么使用len函数,都会出现报错,解