python解壓並讀取檔案

ZhaoHH丶發表於2020-11-23
import zipfile

with zipfile.ZipFile('E:\data\jaychou_lyrics.txt.zip') as zin:
    with zin.open('jaychou_lyrics.txt') as f:
        corpus_chars = f.read().decode('utf-8')

相關文章