import os
import time
def main():
content = '北京欢迎你为你开天辟地…………'
while True:
# 清理屏幕上的输出
# os.system('cls')
os.system('clear')
print(content)
# 休眠200毫秒
time.sleep(0.2)
content = content[1:] + content[0]
if name == '__main__':
main()
原本应该是实现一行字幕在不停地变化,但是用jupyter运行结果是字幕在不停地往下走,python小白求各位大佬指教~