用python生成1000个txt文件的方法
作者:longma666666 时间:2023-03-24 07:51:11
问题,用python生成如下所示的1000个txt文件?
解答:
import os
for i in range(0,1001):
os.mknod("./a/%04d.txt"%i)
来源:https://blog.csdn.net/longma666666/article/details/79044886
标签:python,生成,txt
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python3 简单实现组合设计模式
2023-06-12 19:15:50
![](https://img.aspxhome.com/file/2023/2/59482_0s.png)
Javascript 动画初探(原理)
2009-02-06 15:53:00
Python2.x版本中基本的中文编码问题解决
2021-01-06 14:02:16
python按比例随机切分数据的实现
2021-05-28 05:17:34
PHP实现登录注册之BootStrap表单功能
2024-05-11 09:07:25
![](https://img.aspxhome.com/file/2023/0/127180_0s.jpg)
对python中数据集划分函数StratifiedShuffleSplit的使用详解
2022-12-04 23:10:28
![](https://img.aspxhome.com/file/2023/4/126994_0s.jpg)
python神经网络Inception ResnetV2模型复现详解
2023-02-28 08:51:35
![](https://img.aspxhome.com/file/2023/3/76943_0s.png)
关于Python卷积函数详解
2023-06-14 01:09:27
![](https://img.aspxhome.com/file/2023/7/133667_0s.jpg)
Python+Delorean实现时间格式智能转换
2021-08-13 12:05:41
python查找指定具有相同内容文件的方法
2023-08-14 17:20:04
matplotlib.pyplot画图并导出保存的实例
2022-10-02 13:32:26
十大热门的JavaScript框架和库
2024-05-02 17:25:36
![](https://img.aspxhome.com/file/2023/2/129782_0s.jpg)
快速创建python 虚拟环境
2023-10-04 08:58:31
![](https://img.aspxhome.com/file/2023/9/95379_0s.png)
python套接字流重定向实例汇总
2022-04-15 07:53:41
解决MySQl查询不区分大小写的方法讲解
2024-01-12 13:49:51
python 下划线的不同用法
2021-01-20 16:55:13
GIt在pyCharm的详细使用教程记录
2021-11-21 02:21:05
![](https://img.aspxhome.com/file/2023/3/87893_0s.jpg)
JavaScript字符串对象substr方法入门实例(用于截取字符串)
2024-06-05 09:53:44
python根据京东商品url获取产品价格
2022-01-26 12:14:31
浅谈innodb_autoinc_lock_mode的表现形式和选值参考方法
2024-01-12 17:22:55