xxxxxxxxxx
hash_dict={'Python' : '101' , 'PHP': '102' , 'Java': '103'}
#if you want to access only one key value from the dictionary, so just simply add the key whose value you want to know like this
hash_dict['Python']
xxxxxxxxxx
# Example dictionary
my_dict = {"key1": "value1", "key2": "value2", "key3": "value3"}
# Method 1: Using `in` operator
if "key2" in my_dict:
print("Key 'key2' exists in dictionary.")
# Method 2: Using `get()` method
if my_dict.get("key2"):
print("Key 'key2' exists in dictionary.")