Convert '165.0' to int

Chris Angelico rosuav at gmail.com
Sun Jul 24 04:07:39 EDT 2011


On Sun, Jul 24, 2011 at 5:58 PM, Frank Millman <frank at chagford.com> wrote:
>  if int(dec) != 0:
> to
>    if [_ for _ in list(dec) if _ != '0']:
>

if dec.rtrim('0')!='':

ChrisA



More information about the Python-list mailing list