W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
demo_python_dictionary_del_2.py:
thisdict = { "brand": "Porsche", "model": "911", "year": 1963 } del thisdict print(thisdict) #this will cause an error because "thislist" no longer exists.
[email protected]
:/home/python#python demo_python_dictionary_del_2.py
Traceback (most recent call last):
File "demo_dictionary_del3.py", line 7, in <module>
print(thisdict) #this will cause an error because "thisdict" no longer exists.
NameError: name 'thisdict' is not defined