在 python 中,我想使用 \b 退格但它显示 0x08,如何解决这个问题

In python,I want to use \b to backspace but it shows 0x08,how to fix this problem

print("a\bc", end="", flush=True)
#I hope the out put is c rather than a0x08c

the result

我试过你的代码,它对我来说工作得很好,它打印了 https://i.stack.imgur.com/bA97f.png

我猜编辑器或 python 本身有问题,但不确定。

您可以在 IDLE、Jupyter Notebook/Lab 或终端中尝试一次代码。