> One possible fix: do > > x = randint(0, 10) - randint(0, 10) > x = abs(x) - (x<0) > > This collapses -1 and 0 to 0, -2 and 1 to 1, etc.
Or a slightly simpler formula that ends up producing the same distribution: x = min(randint(0, 10), randint(0, 10)) Mark -- http://mail.python.org/mailman/listinfo/python-list