#增删改查
dict1={“name”:“张三”,“sex”:“男”,“age”:56,“clothes”:“冬装”}
dict1[“clothes”]=“夏装”
print(dict1)
dict1[“glasses”]=True
print(dict1)
dict1[“Monday”]=“over 1 billion”
print(dict1)
dict1[“NickName”]=“砖石王老五”
print(dict1)
del dict1[“NickName”]#删除
print(dict1)
dict1.clear()#清空
print(dict1)
python增删改查实验2021-1-7
最新推荐文章于 2024-09-04 20:18:34 发布