2 Star 2 Fork 0

郑骏明/short_script

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
20200521strip_whitespaces.py 320 Bytes
一键复制 编辑 原始数据 按行查看 历史
郑骏明 提交于 2022-02-28 17:52 +08:00 . init
import os
import re
file_path = os.path.join('data_src','课题名称.txt')
with open(file_path,encoding='utf8') as file_hdlr:
txt_src = file_hdlr.readlines()
txt_src = [e.strip() for e in txt_src]
rst = '\n'.join(txt_src)
with open(file_path,encoding='utf8',mode='w') as file_writer:
file_writer.write(rst)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/beneon/short_script.git
[email protected]:beneon/short_script.git
beneon
short_script
short_script
master

搜索帮助