python:practice stdout

import sys,time

for i in range(10):

    sys.stdout.write('***")

can output *************** 

standard input:    stdin

standard output:  stdout

test;

import sys,time

for i in range(30):

    sys.stdout.write('99999')

    sys.stdout.flush

      time.sleep(0.02)

or :

import sys,time

for i in range(30)

      print('*',end='',flush=True)

      time.sleep(0.2)

truncate article characters only left 9  characters.from present cursor position.

file=open(' three gun men'),'a',encoding='utf-8')

    file.truncate(9)

    file.close

 

上一篇:python编程基础篇:python启动应用程序和终止应用程序的方法


下一篇:Supervisor监控springboot应用