<s>[INST] 'has_key()' or 'in'? I wonder what is better to do:
d = {'a': 1, 'b': 2}
'a' in d
True

or:
d = {'a': 1, 'b': 2}
d.has_key('a')
True

 [/INST] in is definitely more pythonic.
In fact has_key() was removed in Python 3.x.
 </s>