Question: how to check if dict contains key?
Answer: has_key() method returns true if a given key is available in the dictionary, otherwise it returns a false. With the Inbuilt method has_key() , use if statement to check if the key is present in the dictionary or not.