PYTHON-FILE-HANDLING
1 article tagged with "python-file-handling"
- Python 教學 3 - File Handling -Read File, Write File2023-08-16
筆記一下在 Python 中讀寫檔案的方式 1. open Function - 針對檔案做操作 Python 提供了 open function 可以針對檔案進行一些操作: 1.1 filename 第一個參數是 filename,可以是相對路徑也可以是絕對路徑。 1.2 mode 用來決定開啟檔案的用途: 也可以決定要用什麼模式開啟檔案: 2. Read File - 讀取檔案