IDLE doesn't support backspace characters,
No, IDLE does not support backspace, nor carriage-return, nor formfeed, nor ANSI escape sequences.
You are expecting \b to move the cursor one cell to the left in IDLE's interactive shell window. It doesn't do that. IDLE does not support cursor addressing in its shell window, with the exception of newline and tab.
source
Additionally, you're using range()
but then you're adding one to i
. You could simplify it by specifying a start and an end range, range(1, 6)
so it'll output 1,2,3,4,5 instead.