import os
cur_path = os.getcwd()
scrip_path = os.path.join(cur_path, "01.py")
with open(scrip_path, "r+") as f:
f.truncate()
python 清空文件
猜你喜欢
转载自blog.csdn.net/qq_23664173/article/details/107114935
今日推荐
周排行