python学习随笔day3
文档读写
#文档内容切片
f=open('abc','r',encoding='utf-8') #abc是文档名称
count = 0;
for line in f:
if count==9:
print("--------------------------------切割线----------------------------------")
count +=1
continue
print(line.strip())
count +=1
# 进度条
import sys
import time
for i in range(30):
sys.stdout.write("***")# 进度条结束后打印
sys.stdout.flush()#进度条实时逐一打印
time.sleep(0.1)#延迟0.1秒执行