python基礎內容整理

python基礎內容整理 1 open(path,mode,encoding) (1)打開文件 file = open(‘music.html’,‘r’,ecoding=‘utf-8’)* (2)encoding表示的是返回的數據採用何種編碼,通常採用utf8或者gbk; 默認爲gbk path 默認爲相對於本工程的相對路徑 若是路徑不存在默認會創 建一個文件html 2.BeautifulSou
相關文章
相關標籤/搜索