In Python 3.13.9 on Windows, the REPL intermittently fails to print the first elements of a loop when using print(..., end=' ').
Expected output: 1 2 3 4 5
Actual output: 3 4 5
The issue does not occur in IDLE, only in the terminal REPL.
Steps to Reproduce:
1)Run in Windows terminal:
for i in [1,2,3,4,5]:
print(i, end=' ')
2)Observed output: 3 4 5
Environment: Python: 3.13.9 (tags/v3.13.9:8183fa5, Oct 14 2025, 14:09:13) [MSC v.1944 64 bit (AMD64)]
Platform: win32
OS: Windows-10-10.0.19045-SP0
Installed via: py -3.13 launcher
Behavior NOT observed in Python 3.11 or in IDLE.
Notes
Reproducible consistently
Only affects REPL output
Likely related to stdout buffering / console IO changes in Python 3.13 on Windows
print(i) (with newline) works correctly