The following code counts from the value of a up to, but not including, b.
a=0; b=10 while a < b: # One way to code counter loops print(a, end=' ') a += 1 # Or, a = a + 1 # w ww .j ava2 s . c om