摘要: #coding=utf-8 # 导入re模块 import re # 使用match方法进行匹配操作 result = re.match(正则表达式,要匹配的字符串) # 如果上一步匹配到数据的话,可以使用group方法来提取数据 result.group() 阅读全文
posted @ 2018-06-29 17:49 我想喝杨枝甘露~ 阅读(92) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8 #2018-6-29 16:30:34 #类调用属性,属性没有,用__getatrr__魔法方法! #目的打印出 think different itcast class Foo(object): """ """ def __init__(self): pass def __getattr__(self,item): ... 阅读全文
posted @ 2018-06-29 17:14 我想喝杨枝甘露~ 阅读(152) 评论(0) 推荐(0) 编辑