Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:string': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; '11:09': 0.16; 'character.': 0.16; 'confuse': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lambda': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'quotes': 0.31; 'subject:numbers': 0.31; 'supposed': 0.32; 'maybe': 0.34; 'subject:from': 0.34; 'subject:with': 0.35; 'received:google.com': 0.35; 'explain': 0.39; '12,': 0.39; 'skip:p 20': 0.39; '2015': 0.84; 'otten': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=n5kXp5ioVSoNONDpDVpW8xCWPv6eyX+prj/5YGEuQzM=; b=T5oj1OODpnYg/QwakHGBNhYloWGrpZUKfNQN/OmF1ebmc9FW+dqo/ZudBrdnUGzbek FssHR/Jg9jHQemVC1y5JyfvDIeOO0Smd+2vnA+Lv6M244S7RlmcqPQQg5AVPzwrYCDOc 9zDMD/DqVkW2kMWLPnTuSe+nhZv549ZiNcCDmycMcSyhc1zSt/JVLrsscpVr70F6YZJo aRqZ/MLnyHYkiWPjArJB5n17kpw6JgRW7cIR/w+h7fZMocGznMgYlVV+UjDQVgcpdnO2 vaqPVZqMMswY+19TuQlTqmxve1e41qEMy+lR99FRAIwSIrWpWClby7e1Cmb6axC7yiLE ULYw== MIME-Version: 1.0 X-Received: by 10.42.94.14 with SMTP id z14mr21165404icm.59.1421021849616; Sun, 11 Jan 2015 16:17:29 -0800 (PST) In-Reply-To: References: <7240a574-dfd7-46c3-80eb-0657b41894bb@googlegroups.com> <3bfeea22-cded-4363-92fa-6f1b33ddae16@googlegroups.com> <8077448.xvuXrbCisO@PointedEars.de> <2182977.fJl0o3iPdP@PointedEars.de> <1786463.stBbe1naGD@PointedEars.de> Date: Mon, 12 Jan 2015 11:17:29 +1100 Subject: Re: extracting numbers with decimal places from a string From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1421021857 news.xs4all.nl 2829 [2001:888:2000:d::a6]:42923 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:83581 On Mon, Jan 12, 2015 at 11:09 AM, Peter Otten <__peter__@web.de> wrote: >> >> print(sum(map(lambda x: float(x), s.split(','))) >> >> Please trim your quotes to the relevant minimum. > > Hm, can you explain what this > > lambda x: float(x) > > is supposed to achieve? I mean other than to confuse a newbie... Maybe he gets paid by the character. ChrisA