2019年8月20日

Python实现一个进度条

摘要: from time import sleep def progress(percent=0, width=30): left = width * percent // 100 right = width - left print('\r[', '#' * left, ' ' * right, ']',f' {percent:.0f}%',sep='', end='', flush=True) fo 阅读全文

posted @ 2019-08-20 08:40 零度风格 阅读(1353) 评论(0) 推荐(0) 编辑

导航