Python學習日誌--文件讀寫

在編程過程當中常常須要文件讀寫,Python的文件讀寫要比Java簡單的多。python 打開文件的集中方式:編程 # 1.只讀 open("path/filename","r") # 2.只寫 open("path/filename","w") # 3.追加 open("path/filename","a") # 讀取整個文件 file = open("path/filename","r"
相關文章
相關標籤/搜索