Python

python2中的字典有has_key方法,python3中删除了

if dict.has_key(your_key):

改成

if your_key in dict:
原文地址:https://www.cnblogs.com/vercont/p/10210148.html