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


Groups > comp.lang.python > #53951

Re: print function and unwanted trailing space

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <wayne@waynewerner.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.083
X-Spam-Evidence '*H*': 0.86; '*S*': 0.02; 'cc:addr:python-list': 0.11; 'sat,': 0.16; 'wrote:': 0.18; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'define': 0.26; 'header:In-Reply-To:1': 0.27; 'charset:us-ascii': 0.36; 'skip:- 20': 0.37; 'subject:space': 0.84; '2013,': 0.91
Date Wed, 11 Sep 2013 06:36:11 -0500 (CDT)
From Wayne Werner <wayne@waynewerner.com>
X-X-Sender wayne@gilgamesh
To candide <candide@free.invalid>
Subject Re: print function and unwanted trailing space
In-Reply-To <5221a693$0$2059$426a74cc@news.free.fr>
References <5221a693$0$2059$426a74cc@news.free.fr>
User-Agent Alpine 2.02 (DEB 1266 2009-07-14)
MIME-Version 1.0
Content-Type TEXT/PLAIN; charset=US-ASCII; format=flowed
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.240.1378899450.5461.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1378899450 news.xs4all.nl 15891 [2001:888:2000:d::a6]:37291
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53951

Show key headers only | View raw


On Sat, 31 Aug 2013, candide wrote:
> # -----------------------------
> for i in range(5):
>    print(i, end=' ')   # <- The last ' ' is unwanted
> print()
> # -----------------------------

Then why not define end='' instead?

-W

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


Thread

print function and unwanted trailing space candide <candide@free.invalid> - 2013-08-31 10:17 +0200
  Re: print function and unwanted trailing space Andreas Perstinger <andipersti@gmail.com> - 2013-08-31 10:43 +0200
    Re: print function and unwanted trailing space candide <candide@free.invalid> - 2013-08-31 11:25 +0200
      Re: print function and unwanted trailing space Peter Otten <__peter__@web.de> - 2013-08-31 12:31 +0200
        Re: print function and unwanted trailing space candide <candide@free.invalid> - 2013-08-31 15:33 +0200
          Re: print function and unwanted trailing space Peter Otten <__peter__@web.de> - 2013-08-31 15:59 +0200
            Re: print function and unwanted trailing space candide <candide@free.invalid> - 2013-08-31 17:58 +0200
          Re: print function and unwanted trailing space Chris Angelico <rosuav@gmail.com> - 2013-09-01 01:30 +1000
          Re: print function and unwanted trailing space Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-08-31 16:43 +0100
          Re: print function and unwanted trailing space Chris Angelico <rosuav@gmail.com> - 2013-09-01 08:08 +1000
          Re: print function and unwanted trailing space Joshua Landau <joshua@landau.ws> - 2013-09-01 00:15 +0100
          Re: print function and unwanted trailing space Terry Reedy <tjreedy@udel.edu> - 2013-08-31 19:57 -0400
        Re: print function and unwanted trailing space candide <candide@free.invalid> - 2013-08-31 17:51 +0200
  Re: print function and unwanted trailing space Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-31 11:16 +0000
    Re: print function and unwanted trailing space Peter Otten <__peter__@web.de> - 2013-08-31 14:27 +0200
    Re: print function and unwanted trailing space Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-08-31 13:37 +0100
    Re: print function and unwanted trailing space candide <candide@free.invalid> - 2013-08-31 14:59 +0200
      Re: print function and unwanted trailing space Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-31 15:18 +0000
  Re: print function and unwanted trailing space Ned Batchelder <ned@nedbatchelder.com> - 2013-08-31 07:24 -0400
    Re: print function and unwanted trailing space candide <candide@free.invalid> - 2013-08-31 15:51 +0200
  Re: print function and unwanted trailing space Wayne Werner <wayne@waynewerner.com> - 2013-09-11 06:36 -0500
  Re: print function and unwanted trailing space Albert Hopkins <marduk@letterboxes.org> - 2013-09-12 15:25 -0400

csiph-web