os.listdir('.')

返回包含目录中文件名称的列表。
    
     path可以指定为str或bytes。 如果path是bytes,
       返回的文件名也将是字节; 在所有其他情况下
       返回的文件名将是str。
     如果path为None,则使用path ='.'。
     在某些平台上,路径也可以指定为打开的文件描述符; \
       文件描述符必须引用目录。
       如果此功能不可用,则使用它会引发NotImplementedError。
    
     该列表按任意顺序排列。 它不包括特殊
     条目'。' 和'..'即使它们存在于目录中。

Return a list containing the names of the files in the directory.

path can be specified as either str or bytes.  If path is bytes,
  the filenames returned will also be bytes; in all other circumstances
  the filenames returned will be str.
If path is None, uses the path='.'.
On some platforms, path may also be specified as an open file descriptor;\
  the file descriptor must refer to a directory.
  If this functionality is unavailable, using it raises NotImplementedError.

The list is in arbitrary order.  It does not include the special
entries '.' and '..' even if they are present in the directory.
"""
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值