The syntax for inserting list items at specific index is

linsert listname index value1 value2..valuen

Example:

set var {orange blue red green}
set var [linsert $var 3 black white]
puts $var

Discover more from Tips and Hints for Aerospace Engineers

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

Continue reading