how to get the length of a number

Fredrik Lundh fredrik at pythonware.com
Sun Jun 11 22:49:01 CEST 2006


Felipe Almeida Lessa wrote:

> Hmmm, you're right.
> 
> math.floor(math.log(x, 10)) + 1

x = 0

</F>






More information about the Python-list mailing list