If you try to use has_key() in newer versions of Python, including Python 3, you will get an Attribute error since has_key() is not available Python 3 onwards. The runtime error message will read: AttributeError: 'dict' object has no attribute 'has_key'