Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101691
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Strange behavior |
| Date | 2016-01-14 23:56 +1100 |
| Message-ID | <mailman.150.1452776209.13488.python-list@python.org> (permalink) |
| References | <CAMpD5E6MWjTruSF2_o3uSyGem4bCfiQwB+ZKcKv0OVvG7Fek8g@mail.gmail.com> |
On Thu, Jan 14, 2016 at 3:03 PM, Michal Nalevanko <michal.nalevanko@gmail.com> wrote: > I've just installed Python 3.5.1 on my computer and came across somewhat > strange behavior. > > This is a snapshot of a short code that I wrote: https://goo.gl/izYbD0 > > Quite simple, you might say. Obviously, the program should create a new > text file, nothing else. But do you see the numbers it had added to the > output? > > Is this behavior normal or am I overlooking something? Thank you very much > for your help. Hi Michal! When you work with Python interactively, the interpreter prints out the results of expressions automatically. This doesn't happen when you write a script, but it's often helpful with simple tinkering. The numbers getting printed out are the returned values from the .write() method; they're a simple check saying how much stuff got written. You can ignore them - your file has been created correctly. ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Strange behavior Chris Angelico <rosuav@gmail.com> - 2016-01-14 23:56 +1100
csiph-web