由python2.7 代码更改成python3.5 时 dict 数据类型报错python
产生缘由: dict.has_key() ; python3 中删除了该方法python2.7
解决方法: 使用 code
if key in dict : 更改成 if dict.has_key(key):