多項選擇題

判斷某個key是否在字典d中存在,以下做法正確且嚴謹的是:()

A.’key’ind.keys()
B.d.get(’key’)isnotNone
C.hasattr(d,’key’)
D.’key’ind

微信掃碼免費搜題