While I tried some things in my Python 3 interpreter (Python 3.4.2 installed via brew), I came across some strange findings that I did not expect:
>>> import sys
>>> sys.stdout.write("foo")
foo3
>>> sys.stderr.write("bar")
3
bar
After experimenting with different lines, I think the number is the length of the inputs that I pass.
I tried this in Python 2.7.8 (does not give numbers in the outputs), and Python 3.4.2 created virtualenv(gives the same result)
Should the conclusion be like this?
source
share