📜  python 将光标移动到上一行 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:28.750000             🧑  作者: Mango

代码示例1
"\033[F" – move cursor to the beginning of the previous line
"\033[A" – move cursor up one line

Example:
  import sys
  sys.stdout.write("\033[F")
  sys.stdout.write("This line is replaced one")
  sys.stdout.write("\033[A")
  sys.stdout.write("More text is added to the previous line")
  sys.stdout.flush()