UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position

用python寫的代碼,大體是如下內容出錯python import os # 使用os獲取mypath文件夾內的文件 dir = os.listdir("mypath") # dir=[file1,file2,file3] for file in dir: with open(file,"rt") as f # 「rt」表示以文本模式讀取文件,默認是utf-8編碼
相關文章
相關標籤/搜索