python:文件读写
#!/usr/bin/python
# -*- coding:utf-8 -*-
#!/usr/bin/python
# -*- coding:utf-8 -*-
file1 = open('a.txt','r')
str = file1.read()
file2 = open('b.txt','w')
file2.write(str)
#!/usr/bin/python
# -*- coding:utf-8 -*-
#!/usr/bin/python
# -*- coding:utf-8 -*-
file1 = open('a.txt','r')
str = file1.read()
file2 = open('b.txt','w')
file2.write(str)