Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #37207 > unrolled thread
| Started by | Lie Ryan <lie.1296@gmail.com> |
|---|---|
| First post | 2013-01-22 02:56 +1100 |
| Last post | 2013-01-22 02:56 +1100 |
| Articles | 1 — 1 participant |
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: why not? Lie Ryan <lie.1296@gmail.com> - 2013-01-22 02:56 +1100
| From | Lie Ryan <lie.1296@gmail.com> |
|---|---|
| Date | 2013-01-22 02:56 +1100 |
| Subject | Re: why not? |
| Message-ID | <mailman.751.1358783791.2939.python-list@python.org> |
On 22/01/13 04:02, kwakukwatiah@gmail.com wrote: > f = open(r'c:\text\somefile.txt') > for i in range(3): > print str(i) + ': ' + f.readline(), > please with the print str(i) + ‘: ‘ + f.readline(), why not print str(i) > + f.readline(), Try running both code. What do you see? What's the difference? When do you think you might want one or the other?
Back to top | Article view | comp.lang.python
csiph-web