Question: how to check if dictionary key already exists?
Answer: # given key already exists in a dictionary. 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.