random.randint() wierdness.
Michael Hudson
mwh21 at cam.ac.uk
Wed Aug 2 19:09:03 EDT 2000
Steve Juranich <sjuranic at condor.ee.washington.edu> writes:
> Could somebody please explain this?
No, because the output you included can't have been produced by the
code you showed (unless you have a monumentally ancient Python).
> >>> for i in range(20):
> ... random.randint(1, 32)
How does this get printed?
> ... print i
Wrt the below, "why".
> ...
> 14
> 0 <--------- I don't get it. Why?
[schnipp]
Cheers,
M.
--
I also fondly recall Paris because that's where I learned to
debug Zetalisp while drunk. -- Olin Shivers
More information about the Python-list
mailing list