摘要: 1、time和datatime 2、subprocess http://hackerxu.com/2014/10/09/subprocess.html 3、正则表达式: re 模块提供正则表达式匹配操作 常用正则表达式符号: re.match 与re.search re.match只匹配字符串的开始 阅读全文
posted @ 2016-10-26 22:46 andypengx 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 数据类型: 可变对象与不可变对象: 元组(tuple)、数值型(number)、字符串(string)均为不可变对象,而字典型(dictionary)和列表型(list),集合(set)的对象是可变对象。字典的key一定要是不可变对象 无序与有序: 元组,列表,他们都是有序的,因为他们底层都是使用链 阅读全文
posted @ 2016-10-26 22:43 andypengx 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 导入模块 1、import 2、__import__: 内置函数__import__ 可以动态导入模块,接受字符串作为参数 eg: mod = __import__('os') # 相当于import os as mod func = getattr(mod,'walk') # 通过反射获取 fun 阅读全文
posted @ 2016-10-26 16:49 andypengx 阅读(116) 评论(0) 推荐(0) 编辑