- """
- python获取每个文件的名称和大小.py
- """
- import os
- [print(os.path.basename(r),str(os.path.getsize(r))+"我知道你很不爽,你咬我啊") for r in os.listdir(".") if os.path.isfile(r)]
- input()
- #该片段来自于http://www.codesnippet.cn/detail/2508201614985.html
来源: http://www.codesnippet.cn/detail/2508201614985.html