练习
聚悟能
天下有道,以道殉身;天下无道,以身殉道...
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python 统计指定目录大小
import os#统计指定目录大小sum = 0def statistics_dir(dirPath): global sum #遍历所有文件,判断是否为文件,文件则统计大小并累加,目录则递归调用,最后返回累加结果 for f in os.listdir(dirPath): absPath=os.path.join(dirPath,f) ...原创 2020-03-01 15:29:23 · 780 阅读 · 0 评论 -
Python 输出九九乘法表(for,while)
#循环输出9*9乘法表# 左下三角print("="*63)print("for左下三角乘法表1:")for row in range(1,10): for col in range(1,row+1): print('{0}*{1}={2:<2}'.format(col,row,row*col),end=' ') print() #换行print...原创 2020-03-01 15:00:12 · 887 阅读 · 0 评论
分享