Python--File及OS操做

Python–File及OS操做 一、File操做 Python使用open函数能够打开一个文件。html 如使用open函数打开"a.txt",打开权限是只读。使用该函数会返回一个对象,经过该对象能够调用一系列文件操做的方法。python file=open("a.txt","r") data=file.readline() print(data) 整个open函数的参数以下:web open(
相关文章
相关标签/搜索