Steve D'Aprano wrote:
A harder question is, what if you take a random number from the Integers? How many digits will it have in (say) base 10? I don't have a good answer to that. I think it may be ill-defined.
I think the answer is that on average it has infinitely many digits -- despite every actual integer only having finitely many digits! We can prove this by contradiction. Suppose the answer were some finite number N. There are only finitely many integers with N or fewer digits, but there are infinitely many with more than N digits, so including them in the average must make it bigger than N. So N cannot be finite. -- Greg -- https://mail.python.org/mailman/listinfo/python-list