I am looking for loop similar to other languages PERL/TCL/C++ in python.
Like in TCL below is the for loop
for { set i 0 } { $i < $n } { incr i} {
#I like to increment i value manually too like
if certain condition is true then increment
set i = [expr i+1] # in some cases
print i
I there similar way in python too. In python i know below is the for loop syntax
for i in var1
#How to increment var1 index manually in some scenarios
var1in your example withrange(0, n, 1)