小编Ale*_* S.的帖子

使用单独的程序替换另一个文件中的Text

我有两个文件:

文本

program.py

我在我的文章中插入文字

文本

使用该行的文件:

inp=input('Text by the user')
with open("text.py", "a") as myfile:
   myfile.write(inp)
Run Code Online (Sandbox Code Playgroud)

如何让程序删除文本中的行,并说出:

文本2

text1 text2

什么时候跑两次?

python file python-3.x

3
推荐指数
1
解决办法
27
查看次数

标签 统计

file ×1

python ×1

python-3.x ×1