On Jul 24, 10:07 am, Chris Angelico <ros...@gmail.com> wrote:
> On Sun, Jul 24, 2011 at 5:58 PM, Frank Millman <fr...@chagford.com> wrote:
> >  if int(dec) != 0:
> > to
> >    if [_ for _ in list(dec) if _ != '0']:
>
> if dec.rtrim('0')!='':
>
> ChrisA

I think you meant 'rstrip', but yes, neater and faster.

Thanks

Frank
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to