我可以帮你写一个Python脚本来反转文件,你可以使用以下代码:with open("input.txt", "r") as f: text = f.read() text_list = text.split("\n") text_list.reverse()
with open("output.txt", "w") as f: for line in text_list: f.write(line + "\n")
我可以帮你写一个Python脚本来反转文件,你可以使用以下代码:with open("input.txt", "r") as f: text = f.read() text_list = text.split("\n") text_list.reverse()
with open("output.txt", "w") as f: for line in text_list: f.write(line + "\n")