进度条:
import sys
import time for i in range(50):
sys.stdout.write("*")
sys.stdout.flush()
time.sleep(0.1)
文件读取(效率高效的读取大文件方法,一行读取后释放内存):
count = 0
for line in f:
if count == 9:
print("------我是分割线------")
count += 1
continue
print(line)
count += 1
进度条:
import sys
import time for i in range(50):
sys.stdout.write("*")
sys.stdout.flush()
time.sleep(0.1)
文件读取(效率高效的读取大文件方法,一行读取后释放内存):
count = 0
for line in f:
if count == 9:
print("------我是分割线------")
count += 1
continue
print(line)
count += 1