On 12/01/2014 05:58, Chris Angelico wrote:
[...](BTW, is there no better notation than six nested for/range for doing 6d6? I couldn't think of one off-hand, but it didn't really much matter anyway.)
If you're willing to do an import, then how about this: >>> from itertools import product >>> len([x for x in product(range(1, 7), repeat = 6) if sum(x) < 14])/6**6 0.03587962962962963 -- https://mail.python.org/mailman/listinfo/python-list