随笔分类 -  python

摘要:参考自https://www.cnblogs.com/rollenholt/archive/2012/04/23/2466179.html os模块和shutil模块 import os import shutil 目录操作 1.取得当前目录 s = os.getcwd() eg:将abc.py放入 阅读全文
posted @ 2020-05-24 08:47 翠果不是果果 阅读(285) 评论(0) 推荐(0)
摘要:####1.读取 read()到文件末尾返回空字符串,输出为空行 file_object.read 返回字符串 fp.readline([size]) 读取一行,如果定义了size,有可能返回的只是一行的一部分 fp.readlines([size]) 把文件每一行作为一个list的一个成员,并返回 阅读全文
posted @ 2020-05-22 17:02 翠果不是果果 阅读(149) 评论(0) 推荐(0)