Code example from Playing with Keyed Lists on Mac OS X Tcl/Tk Aqua 8.4.2

;# Listing 1. Brute force simple Tcl list, atom_list
;#            Demonstrates creating a simple list
;#            and retrieving elements from the list.

;# create the simple list that contains 2 list elements.
set atom_list {
    { Hydrogen { H 1 1.0079 1s1 } }
    { Helium { He 2 4.00260 1s2 } }
}

;# display the values in the list of two list elements.
foreach atom $atom_list {
    set atom_name [lindex $atom 0]
    set atomic_data [lindex $atom 1]
    set atomic_symbol [lindex $atomic_data 0]
    set atomic_number [lindex $atomic_data 1]
    set atomic_weight [lindex $atomic_data 2]
    set electron_configuration [lindex $atomic_data 3]
    puts "$atom_name $atomic_symbol $atomic_number $electron_configuration"
}