如果你读取整个文件,content = open('Path/to/file', 'r').read()文件句柄是否保持打开状态直到脚本退出?是否有更简洁的方法来读取整个文件?
content = open('Path/to/file', 'r').read()
python file-io filehandle
file-io ×1
filehandle ×1
python ×1