‘dict’ object has no attribute 'has_key'

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Beyond_F4/article/details/88687039

python2中字典可以使用has_key()来判断键是否存在

在python3中改为‘’xxx‘’ in dict.keys()

猜你喜欢

转载自blog.csdn.net/Beyond_F4/article/details/88687039
今日推荐