python 判断字典中是否存在某个key的方法
>>> d = {"a": 1, "b":2}
>>> "c" in d
False
>>> "d" not in d
True
关注公众号「Python之禅」,回复「1024」免费获取Python资源
python 判断字典中是否存在某个key的方法
>>> d = {"a": 1, "b":2}
>>> "c" in d
False
>>> "d" not in d
True
关注公众号「Python之禅」,回复「1024」免费获取Python资源