Should I use ‘has_key()’ or ‘in’ on Python dicts? by Tarik in is definitely more pythonic. In fact has_key() was removed in Python 3.x.