Hi, I'm working with some sorting algorithms and I want to compare their efficiency. One test fills a list with one million random integers, which serves as input for the algorithms. However, if this list is different each time I run the tests, the tests wouldn't be fair. At the moment the selected sorting alg. can be specified with a switch and only one alg. is tested each time.
So what I want is the following: fill the list with random numbers, but when I re-execute the script, I want the same "random" numbers in the same order. This way each sorting alg. would get the same input. As a workaround, I made a generator that outputs a random list in a file, and this list is read each time by the testing script. I just wonder if there is a more elegant solution. Thanks, Laszlo -- http://mail.python.org/mailman/listinfo/python-list