To update the values stored within a dictionary Tcl provides the dict set
command. The syntax of this command is as follows:
dict set name key value… key value…
In the following example, we will create a dictionary containing collections of key/value pairs and then using the dict set
we will update a stored value. Return values from the commands are provided for clarity. Enter the following command:
% set test [dict create 1 John 2 Mary 3 Paul]
1 John 2 Mary 3 Paul
% dict set test 2 Martha
1 John 2 Martha 3 Paul
18.118.163.250