Discuss / Python / 练习

练习

Topic source

test_number

#1 Created at ... [Delete] [Delete and Lock User]

with open('...test.txt','r') as f: s=f.readlines() with open('...test.txt','w') as w: for i in s: w.write(i.replace('很漂亮','不好看')) print(s)


  • 1

Reply