李政翰python檔案file方法methods

UTF8 encoding編碼

練習程式碼

f = open("ascii.txt", "r+", encoding='utf8') x = f.read() print(x) f.write("\n李政翰") #寫入字串 f.close() #李政翰關閉檔案 print('f長度',len(x)) for i in x: #用迴圈印出每一個字元 print(i)

影片377

影片378

ascii art字元藝術

留言

這個網誌中的熱門文章

李政翰EXCEL與python執行樞紐分析的比較