Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'output': 0.04; 'subject:How': 0.09; 'subject:script': 0.09; 'kurt': 0.11; 'advance.': 0.15; '11:42': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'innermost': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'header:In-Reply-To:1': 0.25; 'replace': 0.27; 'to?': 0.27; 'message-id:@mail.gmail.com': 0.27; 'cells': 0.29; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85.220': 0.35; 'table': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'thank': 0.36; 'item': 0.37; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'first': 0.61; 'price': 0.66; 'subject:this': 0.84; '2013': 0.84 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:to :content-type; bh=9MqagQJx5Y+/FTWpC0LrKY2hGey/Frgt7FWkS/F9aFE=; b=rlTLsokrvrHHh3pwmxKPAgpzSEY70pFSlxXpx4y/6trLzsCUbGJmq/ac3j1E//f0eN psl0HRFgQ+kmx2MQ1HQde765wBTN3If1DTBfp85VjR5seTqYHaJXpgWIdDMC5K1g5uEh dck/Z/UYRlPXtClSpZpJpYhQIKCjFmwIS0gbYW8B+MYoL8JD5VEK4B9gkNTHh2NcKGJC CETgZflTy6nwyTqCV6S4okGIK4nZSHgNuuVpvyr/DChxq0Twg5BKmBv2k3/9asa2DgNN 7BlGKn78U4jFTHdYx6wJHNKOyV1SQEgPD9fhYmpRC7v3OWBm+RS7BdWEjpXp7kISaVeg savg== MIME-Version: 1.0 In-Reply-To: <50e97123$0$294$14726298@news.sunsite.dk> References: <50e97123$0$294$14726298@news.sunsite.dk> Date: Sun, 6 Jan 2013 23:52:03 +1100 Subject: Re: How to modify this script? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357476725 news.xs4all.nl 6937 [2001:888:2000:d::a6]:49007 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36238 On Sun, Jan 6, 2013 at 11:42 PM, Kurt Hansen wrote: > Since there's only one "field" in the first line, I want this output: > > Price table > > - insted of > > Price table > > How to? Thank you i advance. It's actually quite simple, as long as you don't mind the junk of colspan="1" on all the other cells. Just replace the innermost loop with: for item in columns: output += '' + item + ' ' Untested, but it ought to work - as long as you never have _more_ cells in the line. ChrisA