The syntax for selecting list item at a specific index is

lindex listname index

Example:

set var {orange blue red green}
puts [lindex $var 0]
puts [lindex $var 1]
puts [lindex $var 2]
puts [lindex $var 3]

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading