The syntax for setting list item at a specific index is

lset listname index value

Example:

set var {white blue red green}
lset var 0 black
puts $var

Result:

black blue red green

Discover more from Tips and Hints for Aerospace Engineers

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

Continue reading