曹采臻python檔案file方法methods
f = open("ascii.txt", "r")
#曹采臻開啟open檔案ascii.txt讀取模式r開啟之後要關閉
x = f.read()
f.close()
print("檔案長度", len(x))
print("列印內容",x)
f = open("ascii.txt", "r")
y = f.readlines() #輸出成串列list,長度是列數
print("串列y的長度",len(y))
for i in range(len(y)): #迴圈跑i從0到y的長度
print("第",i,"列",y[i])
f = open("ascii.txt", "a")#加入append()
f.write("曹采臻")