顯示原始碼列印?1# -*- coding:utf-8 -*-2 3 4Str = "Hello this is my Python\n"5f = file("T:\\abc.txt","w")6f.write(Str)7f.close()8 9f = file("T:\\abc.txt","r")10print f.readline()#readline為讀取一行,read為讀取整份文件 Categories: Python