如果字典包含多个键,是否有一个很好的方法来测试?
简短版本:
d = {} if 'a' in d and 'b' in d and 'c' in d: pass #do something
谢谢.
编辑:我只能使用python2.4 -.-
python dictionary
dictionary ×1
python ×1