2012年12月23日
摘要: 1 文件处理 readlines() 和 writelines()方法可以讲列表元素依次写到文件中; file类本身没有提供复制方法,可以使用read()和write()方法模拟实现文件的拷贝,也可以使用shutil模块: shutil.copyfile('hello.txt','hello2.txt') shutil.move('hello.txt','../') ... 阅读全文
posted @ 2012-12-23 16:19 codingcool 阅读(883) 评论(2) 推荐(2) 编辑