Python is also echoing the return value of sys.stdout.write()
call, which is the number of bytes written:
>>> import sys
>>> written = sys.stdout.write('10')
10>>> written
2
Here the next prompt follows the '10'
written without a newline.
Or, as a different way of demoing, writting 0 bytes in a loop prints 0
that many times:
>>> for i in range(3):
... sys.stdout.write('')
...
0
0
0
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…