Python列出文件和目录

import os
[d for d in os,listdir('.')]

在这里插入图片描述

原文地址:https://www.cnblogs.com/CCCrunner/p/11781621.html