dict = { "id": 123, "name": 'xiaoli' } item = dict.get("iid",3) # 字典中有id则返回值,没有返回3 print(item) # 3
python的字典
最新推荐文章于 2022-01-16 17:42:46 发布
dict = { "id": 123, "name": 'xiaoli' } item = dict.get("iid",3) # 字典中有id则返回值,没有返回3 print(item) # 3