def key_exists(dictionary, key):
if key in dictionary:
return True
else:
return False
student = {"name": "John", "age": 20, "grade": "A"}
key_to_check = "age"
if key_exists(student, key_to_check):
print(f"The key '{key_to_check}' exists in the dictionary.")
else:
print(f"The key '{key_to_check}' does not exist in the dictionary.")
#source code --> clcoding.com












































