python在文本开头插入一行

                       问题 对于一个文本文件,需要在起开头插入一行,其他内容不变 解决方法 1 2 3 4 with open('article.txt', 'r+') as f:    content = f.read()            f.seek(0, 0)
相关文章
相关标签/搜索