1、
问题
>>> test2 = dict((('F',20),('i',40),('s',80)))
Traceback (most recent call last):
File "<pyshell#171>", line 1, in <module>
test2 = dict((('F',20),('i',40),('s',80)))
TypeError: 'dict' object is not callable
2、
>>> dict ## 发现内置函数在之前被定义为一个变量了
{'a': 100, 'b': 200}
3、删除dict变量,重新调用
>>> del dict
>>> test2 = dict((('F',20),('i',40),('s',80)))
>>> test2
{'F': 20, 'i': 40, 's': 80}
4、这是个共性问题(内置函数不要当做变量名)
>>> print = 100
>>> print("hello world!")
Traceback (most recent call last):
File "<pyshell#186>", line 1, in <module>
print("hello world!")
TypeError: 'int' object is not callable