# 文件的替换
f1 = file("hello.txt", "r")
f2 = file("hello2.txt", "w")
for s in f1.readlines():    
    f2.write(s.replace("hello", "hi"))
f1.close()
f2.close()

428f23148311ab03d1e6d32c88817e45c097bd5d
<mask token>

<mask token>
for s in f1.readlines():
    f2.write(s.replace('hello', 'hi'))
f1.close()
f2.close()

f1 = file('hello.txt', 'r')
f2 = file('hello2.txt', 'w')
for s in f1.readlines():
    f2.write(s.replace('hello', 'hi'))
f1.close()
f2.close()

# 文件的替换
f1 = file("hello.txt", "r")
f2 = file("hello2.txt", "w")
for s in f1.readlines():    
    f2.write(s.replace("hello", "hi"))
f1.close()
f2.close()
