Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43589

Re: howto remove the thousand separator

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <dreamingforward@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'algorithm': 0.04; 'cc:addr :python-list': 0.11; 'algorithm.': 0.16; 'janssen': 0.16; 'subject:howto': 0.16; 'subject:remove': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; '-0700,': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'subject:the': 0.34; 'received:74.125.82': 0.34; 'received:google.com': 0.35; '14,': 0.36; 'earth': 0.36; 'being': 0.38; 'pm,': 0.38; 'received:74.125': 0.39; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=+BFbiBie5cItslBuZ4bOZ+wGGA988CmZSMgWAxjvaR0=; b=GIEf/y3UeNlQhZEEJYH8sUN7UG9110fXhL4hhmOB/ypLyulgBNCSgs7B7joUp8Pt2K uef6vfPlpalVddEImSO7GO4rtpumy71cPZwmwfv9DEGxYkBkDrsuMM7H+rTmFhbwiZbH 3j5IL5NxvQIXfm/eqTn+qmsw8xYrLi+2/vbsZ+xYMimOIDyLvMf8gYQ7CMnXl1KuR6hJ jzaObtXHTjlNrtLh0z6GVK+8ZCcQYDAyLd2Grf+y4f/b0OW0kaXH2nQtydHb0ODKFita upnAuRaKs6OcO29KYFPbl1MThCbau+/LYIXA2Aq7hyx8vfoTzE9PjfwKebwLINdI8LNy 5bvw==
MIME-Version 1.0
X-Received by 10.180.82.33 with SMTP id f1mr8541930wiy.13.1365986668333; Sun, 14 Apr 2013 17:44:28 -0700 (PDT)
In-Reply-To <516b49dc$0$29977$c3e8da3$5496439d@news.astraweb.com>
References <201304150257331336590@gmail.com> <mailman.596.1365966380.3114.python-list@python.org> <516b49dc$0$29977$c3e8da3$5496439d@news.astraweb.com>
Date Sun, 14 Apr 2013 17:44:28 -0700
Subject Re: howto remove the thousand separator
From Mark Janssen <dreamingforward@gmail.com>
To "Steven D'Aprano" <steve+comp.lang.python@pearwood.info>
Content-Type text/plain; charset=ISO-8859-1
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.611.1365986675.3114.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1365986675 news.xs4all.nl 2667 [2001:888:2000:d::a6]:53040
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43589

Show key headers only | View raw


On Sun, Apr 14, 2013 at 5:29 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On Sun, 14 Apr 2013 12:06:12 -0700, Mark Janssen wrote:
>
>> cleaned=''
>> for c in myStringNumber:
>>    if c != ',':
>>      cleaned+=c
>> int(cleaned)
>
> ....due to being an O(N**2)  algorithm.

What on earth makes you think that is an O(n**2) algorithm and not O(n)?

Mark

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: howto remove the thousand separator Mark Janssen <dreamingforward@gmail.com> - 2013-04-14 12:06 -0700
  Re: howto remove the thousand separator Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-15 00:29 +0000
    Re: howto remove the thousand separator Mark Janssen <dreamingforward@gmail.com> - 2013-04-14 17:44 -0700
      Re: howto remove the thousand separator Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-15 01:14 +0000
        Re: howto remove the thousand separator Chris Angelico <rosuav@gmail.com> - 2013-04-15 11:29 +1000
          Re: howto remove the thousand separator Walter Hurry <walterhurry@lavabit.com> - 2013-04-15 02:25 +0000
            Re: howto remove the thousand separator Roy Smith <roy@panix.com> - 2013-04-14 22:35 -0400
              Re: howto remove the thousand separator Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-15 07:04 +0000
        Re: howto remove the thousand separator Rotwang <sg552@hotmail.co.uk> - 2013-04-15 03:19 +0100
          Re: howto remove the thousand separator Ned Deily <nad@acm.org> - 2013-04-14 22:15 -0700
          Re: howto remove the thousand separator Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-15 07:03 +0000
            Re: howto remove the thousand separator Chris Angelico <rosuav@gmail.com> - 2013-04-15 17:39 +1000
            Re: howto remove the thousand separator Rotwang <sg552@hotmail.co.uk> - 2013-04-15 23:16 +0100

csiph-web