Carriage Return not working in IDLE?

前端 未结 2 895
情深已故
情深已故 2020-12-10 15:12

I\'m trying to create a code for a countdown timer that stays in place: so that each line overwrites the previous one. This is what I have so far:

import tim         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 15:52

    IDLE doesn't support most control characters such as \r, \b. It is still true in 2020 (no support in Python 3.9)

    \r should work if you start Python REPL in a Unix terminal or in Windows console instead.

提交回复
热议问题