Write a python program to add a new key-value pair to an existing dictionary. on April 25, 2025 Get link Facebook X Pinterest Email Other Apps # Existing dictionarymy_dict = { "name": "Anjali", "age": 23, "city": "Delhi"}# New key-value pairmy_dict["college"] = "Delhi University"# Print updated dictionaryprint("Updated Dictionary:")print(my_dict)Output: Comments
Comments
Post a Comment