example: 40286 -> 68204

Shihpin Shihpin.Lin at gmail.com
Mon Jun 4 05:10:32 CEST 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