example: 40286 -> 68204

Shihpin Shihpin.Lin at gmail.com
Mon Jun 4 03:13:14 EDT 2007


Thanks Steven, I will try to decipher that.

Shihpin


On 6 4 ,   1:45, attn.steven.... at gmail.com wrote:
> On Jun 3, 5:23 pm, Shihpin <Shihpin.... at gmail.com> wrote:
> > Is there a fuction that reverse the digits of a number?
> One can use int, str and a slice:
>
> print int(str(40286)[::-1])
>
> --
> Hope this helps,
> Steven





More information about the Python-list mailing list