台部落
註冊
登錄
寫文章
請輸入正確的登錄賬號或密碼
註冊
忘記密碼
首頁
python3.6
正文
報錯 'dict' object has no attribute 'has_key'
原創
wakeworld
2018-08-22 00:26
has_key方法在python2中是可以使用的,在python3中刪除了。
比如:
if dict.has_key(word):
改爲:
if word in dict:
python3.6
dict
發表評論
登录
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
pandas學習筆記D1
EmilyForever18
2019-02-22 17:50:22
編譯安裝Python3.6
qp123458
2019-02-22 14:42:18
01-python簡介
王小哥
2019-02-22 14:41:38
Centos 7.5 python3.6.1Django 環境設置
思考_
2018-12-15 12:58:43
python字典排序
ok庫
2019-02-22 23:59:18
python dict
Eson錢躍健
2019-02-22 22:59:35
python中的字典
wxrwan521001
2019-02-22 21:57:05
redis底層數據結構之dict 字典1
quan333
2019-02-22 21:07:43
Python字典
ciscoxushaojie
2019-02-22 20:19:25
python-字典
gyp150
2019-02-22 20:03:07
字典轉爲對象
lang8027
2019-02-22 16:40:33
練習2
format1026
2019-02-22 16:10:14
python
Art_Hero
2019-02-22 13:13:43
對Python3中dict.keys()轉換成list類型的方法詳解
WMN7Q
2019-02-05 09:02:51
13.字典
聽丶飛鳥說
2019-01-24 13:42:44
W
wakeworld
24小時熱門文章
最新文章
'zip' object is not subscriptable
python3.6報錯:AttributeError: 'str' object has no attribute 'decode'
報錯 'dict' object has no attribute 'has_key'
object of type 'zip' has no len()
最新評論文章
Mac下配置sublime實現LaTeX
https://yachay.unat.edu.pe/blog/index.php?comment_area=format_blog&comment_component=blog&comment_co
linux以太網驅動總結