洪志坤python檔案方法utf8
utf8 encoding編碼
練習程式碼
f = open("ascii.txt", "r+", encoding='utf8')
x = f.read()
print(x)
f.write("\n洪志坤") #寫入字串
f.close() #洪志坤關閉檔案r+讀增加append
print('f長度',len(x))
for i in x: #用迴圈印出每一個字元
print(i)
影片377
影片378
ascii art字元藝術
上面的原始碼,拷貝下面的code在html模式貼上就可以<iframe src="https://en.wikipedia.org/wiki/ASCII_art" height=400 width=100%></iframe>

留言
張貼留言