b. data_dict.get(key)[key1]=value
c. data_dict.update(data_dict1)
d. data_dict.update(key=value,key1=value1)
e. data_dict.update(**data_dict1) 等同于 data_dict.update(key=value,key1=value1)
a. data_dict.clear()
b. data_dict.pop(key)
c. data_dict.popitem() 随机删除一个并返回(key,value)
d. del data_dict[key]
e. del data_dict
a. data_dict[key] = value_new
b. data_dict.update(key=value_new)
c. data_dict.update(data_dict1)
d. data_dict.update(**data_dict1) 等同于 data_dict.update(key=value,key1=value1)
-
data_dict.get(key,'default_value')
-
data_dict[key]
-
for key,value in data_dict.items() dict.items 是个元组列表[(key,value),(key1,value1)]
-
data_dict.keys() 可以循环打印出key
-
for key in site: 可循环打印出key
data_dict.values() 可循环打印出value
生命很短,请让生活更精彩一些!