how to increment eacl element in a list ?
eg: incrlist {1 2 3}
=>2 3 4
Answer Posted / ritu gupta
set l {1 2 3}
set i 0
foreach e $l {
lset l $i [ expr $e + 1]
incr i
}
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers