1、foreach遍历列表元素。 set list { a b c d e} foreach v $list { puts $v } 输出结果 a b c d e 2、foreach与lrange结合遍历部分列表元素。 set list { a b c d e} foreach v [lrange $list 1 3] { p