Interactive entered code, inserts spurious numbers.

Chris Angelico rosuav at
Fri Jul 31 11:02:36 CEST 2015

On Fri, Jul 31, 2015 at 6:47 PM, Antoon Pardon
<antoon.pardon at> wrote:
> That is different behaviour from python2, which gives me
> the expected result. My guess is that the write returns
> 11, being the number of characters written en that the
> interpreter, shows that each time through the loop.
> But is this the expected behaviour in python3? I find
> it annoying.

It is; it's the behaviour of the interactive interpreter. If you want
to disable that, change sys.displayhook to not print stuff out, or
assign to a dummy variable.


More information about the Python-list mailing list