[Tutor] reverse a number (was no subject)

Blake Winton bwinton@latte.ca
Mon, 12 Aug 2002 11:30:12 -0400


* alan.gauld@bt.com <alan.gauld@bt.com> [020812 06:35]:
> > To do this without using a string I had to loop through
> > the number twice.  The first time to see how many digits,
> > the second to actually compute the number.
> length = len(str(number))  # beware of '.' in floats tho'!

len(str(int(number))) #?

Later,
Blake.
-- 
 11:29am  up 7 days, 19:16,  1 user,  load average: 0.00, 0.00, 0.00