dict = {'key1': 'geeks', 'key2': 'for'} # using __setitem__ method dict.__setitem__('newkey2', 'GEEK') print(dict)