Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.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.059 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'python': 0.11; 'andreas': 0.16; 'bye,': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'equivalent': 0.26; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'received:google.com': 0.35; 'skip:- 20': 0.37; 'received:10': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'subject:space': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=JneMvG1jrUV2leYgfb2sJPtRUA5s1FSU/7NH4+VgCks=; b=Zm+crc0pZvoPEDM5p2NplfBsFe/rCO+rRh9kQt0RZ1qPIcnStTIKHBb+fwvIOcX8wl PArpshc3olZ9tvxVeY55WAtJ7jmnaBI7Xzc/9YeLkHILIESrf5dC56sLBOQsc9pF6wQK cXLHB/uvMiz33Vd2wMLZyPPLhgcGDOOHCrcs5bfGWh0Vcz31O2l/Ykd3/GK/7bUsvR5p ESbMFAMwGr3qSC3C5PThDSDRR67suLEDVOM9r+hJpPUScbzx8wqhJ/0ZFH1IjtakR8kS KhhNOKV83YdvRmzdz8nZvHoiSCs9Y2cufhh9wpzbymhmNJdsk8A51lSVrVZO02zDu4Y+ BtwQ== X-Received: by 10.14.218.197 with SMTP id k45mr19348328eep.32.1377938637900; Sat, 31 Aug 2013 01:43:57 -0700 (PDT) Date: Sat, 31 Aug 2013 10:43:55 +0200 From: Andreas Perstinger User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: python-list@python.org Subject: Re: print function and unwanted trailing space References: <5221a693$0$2059$426a74cc@news.free.fr> In-Reply-To: <5221a693$0$2059$426a74cc@news.free.fr> 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.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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1377938644 news.xs4all.nl 16000 [2001:888:2000:d::a6]:37550 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53338 On 31.08.2013 10:17, candide wrote: > > What is the equivalent in Python 3 to the following Python 2 code: > > # ----------------------------- > for i in range(5): > print i, > # ----------------------------- > > ? How about >>> print(" ".join(str(i) for i in range(5))) 0 1 2 3 4 Bye, Andreas