Looping with foreach in TCL
- Admin
- Feb 14, 2024
- 1 min read
When you have unsorted list, foreach can be handful
set randomlist {orange blue 4 6 Türkiye 8 France cat dog}
foreach i $randomlist {
puts "i = $i"
}
i = orange
i = blue
i = 4
i = 6
i = Türkiye
i = 8
i = France
i = cat
i = dog
Comments