文件
摘要:打开文件 要打开文件,可使用函数open,它位于自动导入的模块io中。 文件模式 调用函数open时,如果只指定文件名,将获得一个可读取的文件对象。如果要写入文件,必须通过指定模式来显示的指出这一点。 函数open的参数mode的最常见取值 值 描述 'r' 读取模式(默认值) 'w' 写入模式 '
阅读全文
posted @ 2018-04-19 11:06
posted @ 2018-04-19 11:06
posted @ 2018-04-11 12:11
posted @ 2018-04-08 11:52
posted @ 2018-04-03 17:55
posted @ 2018-04-01 16:15