GitHub
摘要: 打开文件 open(file_name,[打开文件的模式],[寄存]) 文件名是字符串形式 绝对路径和相对路径 读和写 文件名.read([count]) 文件名.write([count]) readline() readlines() writelines() 未完待续 2019-03-24 阅读全文
posted @ 2019-03-24 16:30 繁华似锦觅安宁 阅读(247) 评论(0) 推荐(0) 编辑
摘要: re模块 re.match(pattern,string,flags=0) 区别;从头开始匹配 re.research(pattern,string,flags=0)方法 贪婪模式于非贪婪模式 ’*‘ 有关 sub()替换 未完待续 阅读全文
posted @ 2019-03-24 16:17 繁华似锦觅安宁 阅读(127) 评论(0) 推荐(0) 编辑
摘要: type()查看类型 //取整除 **幂 成员运算符: in x在y序列中,就返回true 反之 not in 身份运算符: is is not 逻辑运算符 and or not 字符编码 问题 通用序列操作 索引 >>> 'hello'[1]'e'>>> 'hello'[-2]'l'>>> 分片 阅读全文
posted @ 2019-03-24 12:02 繁华似锦觅安宁 阅读(148) 评论(0) 推荐(0) 编辑