example: 40286 -> 68204

Shihpin Shihpin.Lin at gmail.com
Sun Jun 3 23:10:32 EDT 2007


Brian,

Thanks! I will try it when I come home,

> > Shihpin Lin
>
> This does it:
>
> >>>> def reversed_int(i):
> > ...     return int(''.join(reversed(str(i))))
> > ...
> >>>> reversed_int(12345)
> > 54321
>
> Best,
>
> Brian vdB





More information about the Python-list mailing list