Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9493
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python@mrabarnett.plus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'mrab': 0.05; ':-)': 0.06; 'python': 0.08; 'from:addr:python': 0.09; 'wrote:': 0.15; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'reply- to:addr:python-list': 0.16; '>>>': 0.16; 'header:In-Reply-To:1': 0.22; 'do,': 0.28; 'received:84': 0.28; 'list': 0.32; 'usually': 0.33; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'reply-to:addr:python.org': 0.35; 'subject:Please': 0.37; 'subject:: ': 0.38; 'something': 0.38; 'help': 0.39; 'to:addr:python.org': 0.39; 'peter': 0.62; 'here:': 0.64; 'header :Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'otten': 0.84 |
| X-IronPort-Anti-Spam-Filtered | true |
| X-IronPort-Anti-Spam-Result | AsQHABJxH07Unw4S/2dsb2JhbABUmGSOe3eIfMMThjoEl2SLUg |
| Date | Thu, 14 Jul 2011 23:47:36 +0100 |
| From | MRAB <python@mrabarnett.plus.com> |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Please critique my script |
| References | <77AE044B1BF3944FAE2435F395F11B4B01859CD7@clt-exmb02.bbtnet.com> <mailman.1033.1310670724.1164.python-list@python.org> <ivnkvv$jnn$1@solani.org> |
| In-Reply-To | <ivnkvv$jnn$1@solani.org> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| Reply-To | python-list@python.org |
| 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.1040.1310683659.1164.python-list@python.org> (permalink) |
| Lines | 20 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1310683659 news.xs4all.nl 23890 [2001:888:2000:d::a6]:58471 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:9493 |
Show key headers only | View raw
On 14/07/2011 21:53, Peter Otten wrote: > MRAB wrote: > >>> for line2 in nxxReg.findall(soup): >>> nxxlist.insert(count2, line2) >>> count2 = count2 + 1 >>> >> enumerate will help you here: > >> for count2, line2 in enumerate(nxxReg.findall(soup)): >> nxxlist.insert(count2, line2) > > An insert() at the end of a list is usually spelt append() in Python ;) > If you are looking for something less baroque > > nxxlist = nxxReg.findall(soup) > > will do, too. > That's true... :-)
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Please critique my script MRAB <python@mrabarnett.plus.com> - 2011-07-14 20:12 +0100
Re: Please critique my script Peter Otten <__peter__@web.de> - 2011-07-14 22:53 +0200
Re: Please critique my script MRAB <python@mrabarnett.plus.com> - 2011-07-14 23:47 +0100
csiph-web