import os
import time
def main():
contnent = '山西欢迎您!'
while True:
os.system('cls')
print(contnent)
time.sleep(0.2)
contnent = contnent[1:]+contnent[0]
main()
import os
import time
def main():
contnent = '山西欢迎您!'
while True:
os.system('cls')
print(contnent)
time.sleep(0.2)
contnent = contnent[1:]+contnent[0]
main()
在编辑器运行就是一个?
换到终端去运行就会是清屏的效果啦