Python学习笔记1 -- TypeError: 'str' object is not callable

Traceback (most recent call last):
File "myfirstpython.py", line 39, in <module>
print("params list:",str(sys.argv))
TypeError: 'str' object is not callable

str()是系统的方法,不能在用它的时候,同时自定义一个叫做str的变量,这样就会引起冲突。 检查一下自己的代码是不是也有类似的错误。

posted @ 2018-11-15 10:25  wangyy  阅读(5774)  评论(0编辑  收藏  举报