Python 删除字典元素 Python 更新字典 Python 字典key属性 Python 删除字典元素 #!/usr/bin/python dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'} del dict['Name']; # remove entry with key 'Name' dict.clear(); # remove all entries in dict del dict ; # delete entire dictionary print "dict['Age']: ", dict['Age'] print "dict['School']: ", dict['School'] Python 更新字典 Python 字典key属性