What is the best method to find the number of digits of a positive integer?
I have found this 3 basic methods:
conversion to string
import math def numdigits(n): return ( int(math.floor(math.log10(n))) + 1 )