摘要: 一简介:就其本质而言,正则表达式(或 RE)是一种小型的、高度专业化的编程语言,(在Python中)它内嵌在Python中,并通过 re 模块实现。正则表达式模式被编译成一系列的字节码,然后由用 C 编写的匹配引擎执行。 二字符匹配(普通字符,元字符):普通字符:大多数字符和字母都会和自身匹配 >> 阅读全文
posted @ 2016-06-12 11:57 6随6心6 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 实例: def login(): print('炫酷登录页面') def logout(): print('炫酷推出页面') def home(): print('炫酷主页面') import lib.commons as commons def run(): inp = input('请输入要访问 阅读全文
posted @ 2016-06-12 11:48 6随6心6 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 1、冒泡排序 每次循环都取一次最大值 2、 3、插入排序 阅读全文
posted @ 2016-06-12 10:38 6随6心6 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 1、time模块 #_*_coding:utf-8_*_ import time import datetime print(time.clock()) #返回处理器时间,3.3开始已废弃 print(time.process_time()) #返回处理器时间,3.3开始已废弃 print(time 阅读全文
posted @ 2016-06-12 10:10 6随6心6 阅读(112) 评论(0) 推荐(0) 编辑