关于(1)我不确定.
至于(2),我相信Python在每一行之后都会刷新到stdout.但是,如果你将stdout重载为一个文件,它是否经常刷新?
python file flush
file ×1
flush ×1
python ×1