python 清空文件

    技术2024-07-16  69

    import os cur_path = os.getcwd() scrip_path = os.path.join(cur_path, "01.py") with open(scrip_path, "r+") as f: f.truncate()
    Processed: 0.008, SQL: 9