str='' a = [1,2,3] # for i in a : # str += i # print(str) b=1 # c=repr(b) c =str(1) print(c)
打印时
File "E:/Ipython/字体解密 爬虫/test.py", line 9, in <module>
c =str(1)
TypeError: 'str' object is not callable
Process finished with exit code 1
原因上面有定义的str变量,而str是python内置函数,调用时不能有其他的str变量