python应用-跑马灯

   

import os
import time
def main():
    str1='欢迎来到前锋学习Python'
    while True:
        os.system('cls')
        print(str1)
        time.sleep(0.5)
        str1=str1[1:]+str1[0]

if __name__ == '__main__':
    main()

  import os import time def main(): str1='欢迎来到前锋学习Python' while True: os.system('cls') print(str1) time.sleep(0.5) str1=str1[1:]+str1[0] if __name__ == '__main__': main()

posted @ 2018-03-11 22:02  圆柱模板  阅读(1391)  评论(0编辑  收藏  举报