PythonWin And Excel Problem
Andrea Gavana
andrea.gavana at gmail.com
Fri Dec 1 08:46:13 EST 2006
Hi Michael,
> First of all you should call the random.seed()
> function. That was at least what I´ve always done.
> seed([x])
Thanks for your suggestion, but it doesn't matter whether you call
seed() or not. The random number generator can *not* return 10 equal
values if called 10 times, irrespective of the fact that it is
initalized or not. You can try by simply doing:
import random
print random.random()
print random.random()
print random.random()
And you'll see that the numbers are different.
Moreover, I can populate that list by hand with 10 values like:
therand = [ii for ii in xrange(1, 11)]
And the result in Excel will be the same. All the cells will have the value 1.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
More information about the Python-list
mailing list