把Python知识点整理成100道习题,知识点来自两本书:Python基础教程(第3版)和流畅的Python,以后会定期加入更多的习题,大家帮忙点个赞哈,点赞越多,更新越快~
用 tqdm 库
>>> import time
>>> from tqdm import tqdm
>>> for i in tqdm(range(1000)):
time.sleep(.01)
0%| | 0/1000 [00:00<?, ?it/s]
1%| | 9/1000 [00:00<00:11, 88.38it/s]
2%|1 | 15/1000 [00:00<00:13, 74.85it/s]
2%|1 | 19/1000 [00:00<00:17, 56.93it/s]
2%|2 | 25/1000 [00:00<00:17, 56.70it/s]
3%|3 | 30/1000 [00:00<00:19, 50.90it/s