摘要:
10. Python 标准库概览 10.1. 操作系统接口 os 模块提供了很多与操作系统交互的函数: >>> import os >>> os.getcwd() # Return the current working directory 'C:\\Python35' >>> os.chdir(' 阅读全文
posted @ 2017-12-22 23:52
zqxqx
阅读(218)
评论(0)
推荐(0)
摘要:
7.2. 文件读写 函数 open() 返回 文件对象,通常的用法需要两个参数:open(filename, mode)。 >>> f = open('workfile', 'w') >>> f = open('workfile', 'w') 第一个参数是一个含有文件名的字符串。第二个参数也是一个字 阅读全文
posted @ 2017-12-22 23:38
zqxqx
阅读(338)
评论(0)
推荐(0)