[Idle-dev] double result ...
tayiper at volja.net
Sun Nov 16 01:26:40 EST 2003
Hello, I was just trying some different combinations, and noticed, that in sequence of commands:
>>> for i in range(a,b,c):
>>> print i
... gives value a, becuse it is the first value in the row, and because a, b, c are no "logical sequence" for computer (it doesn't support alphabet) !!
>>> for d in range(a,b,c):
... print d
.. I changed the order of letters to check if I am right.
>>> for d in range(b,c):
... print b
but then I accidentally mixed values and have instead of "print d", used "print b" - and I got two results one after another, two 6. So, I see one stands for varaiable b, and the other for d, from "for d in range" loop, but how is it possible, what happened, how computer gets that result ??
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IDLE-dev