import time
for i in range(, , ):
time.sleep(0.1)
num = i // 2        # 地板除,即取不大于/后的最小整数(3//2 = 1, 9//4 = 2, -7//2 = -4)
s_str = '\r{}% : {}\n'.format(i, '*' * num) if i == else '\r{}% : {}'.format(i, '*' * num)  # \r表示每次光标都会移到行首,非换行
print(s_str, end='', flush=True)      # end=''指定每次print的结束符为空,默认是\n为换行

逐步显示直到显示100% : **************************************************

最新文章

  1. ubuntu下安装chrome
  2. Portal 设置
  3. 实践一:Linux基础实践
  4. 招聘一个靠谱的iOS》面试题参考答案(上)
  5. 关于 profile文件(转)
  6. 【暴力,STL,水】UVa 1523 - Helicopter
  7. 什么是Zookeeper,Zookeeper的作用是什么,在Hadoop及hbase中具体作用是什么
  8. spring mvc 笔记
  9. c#基础语言编程-正则表达式基础
  10. AFNetworking GET和POST请求
  11. Webserver管理系列:5、利用MSConfig排查木马
  12. 探讨弹性布局Flexible Box
  13. [原创]K8Cscan插件之存活主机扫描
  14. Confluence 6 那些文件需要备份
  15. 容器101:Docker基础
  16. options.html:1 Refused to load the script 'xxxx' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:".
  17. LeetCode题解之Convert Sorted List to Binary Search Tree
  18. UIAlertView/UIAlertController封装使用
  19. ElasticSearch 深度分页解决方案 {"index":{"number_of_replicas":0}}
  20. 【liunx】端口号的占用情况查看

热门文章

  1. UVAlive 6756 Increasing Shortest Path
  2. P4195 【模板】exBSGS/Spoj3105 Mod
  3. P5445 [APIO2019]路灯(树套树)
  4. 67.Task Scheduler(任务规划)
  5. JavaScript深入之变量对象(转载)
  6. mysql 数据库连接状态查询
  7. Java数据流学习
  8. uCOS的软件定时器、uCOS时钟节拍和滴答定时器的关系
  9. C#高级编程笔记 (6至10章节)运算符/委托/字符/正则/集合
  10. shell脚本特殊变量与变量子串相关知识