Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'wrote:': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:Convert': 0.16; "subject:' ": 0.16; 'pm,': 0.16; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; 'header:In-Reply-To:1': 0.22; '\xa0if': 0.23; 'message-id:@mail.gmail.com': 0.28; '24,': 0.29; 'sun,': 0.30; 'to:addr:python-list': 0.34; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209': 0.40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=ZaD7Cw7YpYtV4ptNCoCufWLto3sKLjtg8QCMLPHnIOY=; b=cXh18XXTVgkRIt6xdEXB+3JDGPTlwhzgWvyciVyZW8+i59uFNFldz41f1A1hON4BS6 kjmeFHJbzI9Ld5KzMi72QyBmCuZSct/lhsIKPna0vGUYr2sV7usF3aXHtR0kGpukpSB3 /hMnQS1TRpzODsFd1FhP0mk07rGEcA1u9wmr0= MIME-Version: 1.0 In-Reply-To: <1a5604c3-764d-40e1-a063-b05f8729864d@y13g2000yqy.googlegroups.com> References: <4e281f97$0$16404$426a74cc@news.free.fr> <4230ed8b-5173-4408-938f-3777dcd60588@t7g2000vbv.googlegroups.com> <4e2bcaf5$0$30004$c3e8da3$5496439d@news.astraweb.com> <1a5604c3-764d-40e1-a063-b05f8729864d@y13g2000yqy.googlegroups.com> Date: Sun, 24 Jul 2011 18:07:39 +1000 Subject: Re: Convert '165.0' to int From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311494862 news.xs4all.nl 23875 [2001:888:2000:d::a6]:51326 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10193 On Sun, Jul 24, 2011 at 5:58 PM, Frank Millman wrote: > =A0if int(dec) !=3D 0: > to > =A0 =A0if [_ for _ in list(dec) if _ !=3D '0']: > if dec.rtrim('0')!=3D'': ChrisA