Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28770 > unrolled thread
| Started by | iMath <redstone-cold@163.com> |
|---|---|
| First post | 2012-09-09 06:27 -0700 |
| Last post | 2012-09-09 19:07 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: What’s the differences between these two pieces of code ? iMath <redstone-cold@163.com> - 2012-09-09 06:27 -0700
Re: What’s the differences between these two pieces of code ? Kwpolska <kwpolska@gmail.com> - 2012-09-09 19:07 +0200
| From | iMath <redstone-cold@163.com> |
|---|---|
| Date | 2012-09-09 06:27 -0700 |
| Subject | Re: What’s the differences between these two pieces of code ? |
| Message-ID | <874765ea-d1cd-40cc-ac8c-ff694648cfae@googlegroups.com> |
在 2012年7月7日星期六UTC+8下午12时56分35秒,iMath写道: > What’s the differences between these two pieces of code ? > > (1) > > for i in range(1, 7): > > print(2 * i, end=' ') > > > > thx everyone > > (2) > > for i in range(1, 7): > > print(2 * i, end=' ') > > print() > > > > > > when executed both respectively in Python shell ,I get the same effect . Who can tell me why ?
[toc] | [next] | [standalone]
| From | Kwpolska <kwpolska@gmail.com> |
|---|---|
| Date | 2012-09-09 19:07 +0200 |
| Subject | Re: What’s the differences between these two pieces of code ? |
| Message-ID | <mailman.422.1347210429.27098.python-list@python.org> |
| In reply to | #28770 |
On Sun, Sep 9, 2012 at 3:27 PM, iMath <redstone-cold@163.com> wrote: > 在 2012年7月7日星期六UTC+8下午12时56分35秒,iMath写道: >> What’s the differences between these two pieces of code ? >> >> (1) >> >> for i in range(1, 7): >> >> print(2 * i, end=' ') >> >> >> >> thx everyone >> >> (2) >> >> for i in range(1, 7): >> >> print(2 * i, end=' ') >> >> print() >> >> >> >> >> >> when executed both respectively in Python shell ,I get the same effect . Who can tell me why ? > > -- > http://mail.python.org/mailman/listinfo/python-list Well, (2) is inserting an additional newline, and (1) isn’t. The shell might not show that, but try running this as a standalone script. -- Kwpolska <http://kwpolska.tk> stop html mail | always bottom-post www.asciiribbon.org | www.netmeister.org/news/learn2quote.html GPG KEY: 5EAAEA16
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web