my while code:
i=0
a = range(100)
while i < range(100):
print i
i += 9
this goes into an infinite loop...may i know why?
is it because an integer is compared to the list? but what happens when i becomes greater than 99?
shouldnt it come out of the while loop?
below code works fine as expected:
i=0
a = range(100)
a_len = len(a)
while i < a_len:
print i
i += 9