Write a python program to add a new key-value pair to an existing dictionary.

# Existing dictionary

my_dict = {

    "name": "Anjali",

    "age": 23,

    "city": "Delhi"

}


# New key-value pair

my_dict["college"] = "Delhi University"


# Print updated dictionary

print("Updated Dictionary:")

print(my_dict)

Output:




Comments